Re: SQL subqueries newbie help

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SQL subqueries newbie help
Дата
Msg-id 25820.1062944553@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SQL subqueries newbie help  (Rod Taylor <rbt@rbt.ca>)
Список pgsql-sql
Rod Taylor <rbt@rbt.ca> writes:
> Oh yeah, sorry.  It needs to be like that because otherwise it is unsure
> what value to use for event.  What you really want is a min function
> that runs a min on date, and returns the appropriate event -- which
> doesn't exist, but I believe could be created

SELECT DISTINCT ON might provide a simpler solution to that requirement.
Check out the "weather reports" example in the SELECT reference page.
        regards, tom lane


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

Предыдущее
От: Alexei Chetroi
Дата:
Сообщение: Re: SQL subqueries newbie help
Следующее
От: "Marek Lewczuk"
Дата:
Сообщение: plPGSQL bug in function creation