Re: A counter argument about DISTINCT and GROUP BY in PostgreSQL

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: A counter argument about DISTINCT and GROUP BY in PostgreSQL
Дата
Msg-id 20080104165052.GC16708@alvh.no-ip.org
обсуждение исходный текст
Ответ на A counter argument about DISTINCT and GROUP BY in PostgreSQL  (dterrors@hotmail.com)
Список pgsql-general
dterrors@hotmail.com wrote:
>
> I've just spent a few hours searching and reading about the postgres
> way of selecting distinct records.  I understand the points made about
> the ORDER BY limitation of DISTINCT ON, and the abiguity of GROUP BY,
> but I think there's a (simple, common) case that have been missed in
> the discussion. Here is my sitation:

Did you try putting the DISTINCT ON in a subselect, and the ORDER BY in
an outer select?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: A counter argument about DISTINCT and GROUP BY in PostgreSQL
Следующее
От: "beer@cmu.edu"
Дата:
Сообщение: data volume resizing and large objects