Re: I need an aggregate with 2 parameters

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: I need an aggregate with 2 parameters
Дата
Msg-id 7536.984439250@sss.pgh.pa.us
обсуждение исходный текст
Ответ на I need an aggregate with 2 parameters  (Salvador Mainé <salvamaine@yahoo.com>)
Список pgsql-sql
Salvador Mainé <salvamaine@yahoo.com> writes:
> I want to select the the day of maximum value for each year for a given
> measurement station.

This is exactly the sort of thing that SELECT DISTINCT ON is meant for.
See the "weatherReports" example in the SELECT man page,
http://www.postgresql.org/devel-corner/docs/postgres/sql-select.html
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: help
Следующее
От: Tom Lane
Дата:
Сообщение: Re: help