Re: Distinct on a non-sort column

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Distinct on a non-sort column
Дата
Msg-id 4EB5955E.4000908@hogranch.com
обсуждение исходный текст
Ответ на Distinct on a non-sort column  (Cstdenis <lists@on-track.ca>)
Список pgsql-general
On 11/05/11 11:39 AM, Cstdenis wrote:
> example query: /select distinct on (user_id) * from stories order by
> date_submitted desc limit 10;/


select user_id,max(date_submitted) from stories group by date_submitted;

?

--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


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

Предыдущее
От: Oliver Kohll - Mailing Lists
Дата:
Сообщение: Fwd: explain analyse and nested loop joins
Следующее
От: Antonio Goméz Soto
Дата:
Сообщение: Re: What is *wrong* with this query???