| From: | "boyd (remove_) tb_moore_(at)bealenet_(dot)com" <HeWillRejoice(at)yahoo(dot)com> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: max timestamp |
| Date: | 2004-02-10 19:50:45 |
| Message-ID: | qCaWb.19169$Gx1.13160@fe01.usenetserver.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruno Wolff III | 2004-02-10 20:15:21 | Re: Unique Constraint with foreign Key |
| Previous Message | Herbert R. Ambos | 2004-02-10 19:48:03 | Bug or Feature? |