Re: max timestamp - Mailing list pgsql-sql

From boyd (remove_) tb_moore_@bealenet_.com
Subject Re: max timestamp
Date
Msg-id qCaWb.19169$Gx1.13160@fe01.usenetserver.com
Whole thread Raw
List pgsql-sql
Michael Sterling wrote:
> 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.

I don't trust the news client I was using.  So will answer again from 
the Netscape version;  This worked for me:

I have a table, sis, with schema:                  Table "sis" Column |           Type           | Modifiers
--------+--------------------------+----------- time   | timestamp with time zone | stat10 | integer                  |
ipf10 | real                     | ipf30  | integer                  |
 


select date_part ( 'doy',time ) as jday, max ( time ) from sis group by jday

(doy means day of year, which I called jday)

Boyd




pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: 7.4 - FK constraint performance
Next
From: sad
Date:
Subject: cascade delete