Re: Just 1 in a series...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Just 1 in a series...
Дата
Msg-id 3720.1133544030@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Just 1 in a series...  (Mark Fenbers <Mark.Fenbers@noaa.gov>)
Ответы Re: Just 1 in a series...  (Mark Fenbers <Mark.Fenbers@noaa.gov>)
Список pgsql-sql
Mark Fenbers <Mark.Fenbers@noaa.gov> writes:
> ... However, I only want the first occurrence of a such a series (where the 
> event_id is the same), what SQL syntax should I use to do this? 

You might find the "DISTINCT ON" syntax does just what you want --- see
the "weather report" example on the SELECT reference page.  It's not
standard SQL though.
        regards, tom lane


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

Предыдущее
От: Mark Fenbers
Дата:
Сообщение: Just 1 in a series...
Следующее
От: Mark Fenbers
Дата:
Сообщение: Re: Just 1 in a series...