Re: select distinct() question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: select distinct() question
Дата
Msg-id 1845.1050645291@sss.pgh.pa.us
обсуждение исходный текст
Ответ на select distinct() question  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Список pgsql-novice
Jean-Christian Imbeault <jc@mega-bucks.co.jp> writes:
> I observed the following for one of my queries:
> TEST=# select distinct(prod_id), date_received from invoice_li;
> ...
> Is this the correct behaviour for a select distinct()?

Yes.  Hint: the parentheses in what you wrote are noise.

Possibly you were looking for DISTINCT ON, which does have
a parenthetical list of things-to-distinctify.

            regards, tom lane


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

Предыдущее
От: "paul butler"
Дата:
Сообщение: Re: select distinct() question
Следующее
От: "Jay G. Scott"
Дата:
Сообщение: i guess i can't code in C...