Re: max timestamp

Поиск
Список
Период
Сортировка
От boyd (remove_) tb_moore_@bealenet_.com
Тема Re: max timestamp
Дата
Msg-id qCaWb.19169$Gx1.13160@fe01.usenetserver.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 7.4 - FK constraint performance
Следующее
От: sad
Дата:
Сообщение: cascade delete