Re: max timestamp

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: Michael Sterling <stermic(at)gw(dot)co(dot)jackson(dot)mo(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: max timestamp
Date: 2004-02-15 20:01:37
Message-ID: 402FD021.8020403@klaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Dnia 2004-02-10 19:14, Użytkownik Michael Sterling napisał:

> i'm trying to get the max time stamp, from each day, of a range of
> dates, not just the max time stamp for the complete range dates but
> for each day.

select max(some_time)
group by some_time::date

or

select max(some_time)
group by date_trunc('day',some_time)

Regards,
Tomasz Myrta

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2004-02-15 20:01:38 Re: ORDER BY TIMESTAMP_column ASC, NULL first
Previous Message Robert Creager 2004-02-15 20:00:25 Re: max timestamp