pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dmitry Tkach <dmitry@openratings.com>
To: greg@turnstep.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Count dates distinct within an interval
Date: Tue, 15 Jul 2003 11:00:19 -0400
Message-ID: <3F141703.4080904@openratings.com> (raw)
In-Reply-To: <7f2298d39c75726c835ecbf42f0c8e70@biglumber.com>
References: <7f2298d39c75726c835ecbf42f0c8e70@biglumber.com>

>
>
>You need to elaborate on your logic some more, and state exactly what you 
>would want in the A,B,C case above. Does B get lumped with A or with C? 
>It is within 24 hours of both, after all. Does C not get lumped in with 
>B simply because B has already been lumped in with A?
>
Yes. The first (earliest) entry is counted, then all the later ones a 
skipped as long as they are within 24 hours from the last one, that's 
counted.
In this case, A is counted, B is skipped, because it is within 24 hours 
of A, then C is counted, because it is more than 24 hours from A.

Thanks!

Dima





view thread (5+ messages)  latest in thread

Message-ID: <3F141703.4080904@openratings.com>
Permalink:  ../3F141703.4080904@openratings.com/
Also on:    postgresql.org/message-id/3F141703.4080904@openratings.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dmitry@openratings.com, greg@turnstep.com
  Subject: Re: Count dates distinct within an interval
  In-Reply-To: <3F141703.4080904@openratings.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox