Re: A select DISTINCT query? - followup Q

Поиск
Список
Период
Сортировка
От johnf
Тема Re: A select DISTINCT query? - followup Q
Дата
Msg-id 200801271126.23774.jfabiani@yolo.com
обсуждение исходный текст
Ответ на Re: A select DISTINCT query? - followup Q  (Mike Ginsburg <mginsburg@collaborativefusion.com>)
Ответы Re: A select DISTINCT query? - followup Q  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Sunday 27 January 2008 10:56:18 am Mike Ginsburg wrote:
> Hi Phil,
>   Each of columns that you specify in your SELECT clause, must also
> appear in the GROPU BY clause.
>
> SELECT COUNT(*) AS cnt, name, comment, ...
> FROM tst
> GROUP BY name, comment, ...
> HAVING COUNT(*) = 1;
>
Is the requirement of select fields matching group by fields a SQL92
requirement or something to due to Postgres?  I ask because with Visual Fox
Pro I know that I can have several select fields with only one group by
field.
--
John Fabiani

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

Предыдущее
От: Mike Ginsburg
Дата:
Сообщение: Re: A select DISTINCT query? - followup Q
Следующее
От: Tom Lane
Дата:
Сообщение: Re: A select DISTINCT query? - followup Q