Re: Count dates distinct within an interval - Mailing list pgsql-sql

From Dmitry Tkach
Subject Re: Count dates distinct within an interval
Date
Msg-id 3F141703.4080904@openratings.com
Whole thread Raw
In response to Re: Count dates distinct within an interval  (greg@turnstep.com)
List pgsql-sql
>
>
>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




pgsql-sql by date:

Previous
From: Greg Stark
Date:
Subject: Re: summing tables
Next
From: Jean-Luc Lachance
Date:
Subject: Re: summing tables