From: | Miguel Miranda <miguel(dot)mirandag(at)gmail(dot)com> |
---|---|
To: | Erik Jones <ejones(at)engineyard(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: date ranges in where |
Date: | 2009-05-06 21:55:40 |
Message-ID: | aa6b08350905061455u70298f17ycaa825afe4ed83cc@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
sorry, i edited the date, the correct one is
05-03-2009 12:00:00 AM
If i group by day, it count 1 user for day 2009-05-03 in the output, so it
adds 1 to the total count of the range
regards
On Wed, May 6, 2009 at 3:51 PM, Erik Jones <ejones(at)engineyard(dot)com> wrote:
>
> On May 6, 2009, at 2:48 PM, Miguel Miranda wrote:
>
> Well, i tried all your sugestions, and i found some funny issues, i use
>> the query to count exactly in a day by day basis, and running the query with
>>
>> WHERE lastlogin >= '2009-05-01' AND lastlogin < '2009-05-03'
>>
>> OR
>>
>> WHERE lastlogin >= 'X' AND lastlogin <= 'Y' + '1 day'::interval
>>
>>
>> it includes the 0 hours of day 3:
>>
>> 05-02-2009 12:00:00 AM
>>
>
> No, 05-02-2009 12:00:00 AM is the midnight point between 2009-05-01 and
> 2009-05-02.
>
>
> Erik Jones, Database Administrator
> Engine Yard
> Support, Scalability, Reliability
> 866.518.9273 x 260
> Location: US/Pacific
> IRC: mage2k
>
>
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2009-05-06 21:59:05 | Re: date ranges in where |
Previous Message | Joshua D. Drake | 2009-05-06 21:53:38 | PgUS 501c3 Public Charity |