Re: A select DISTINCT query? - followup Q - Mailing list pgsql-general

From johnf
Subject Re: A select DISTINCT query? - followup Q
Date
Msg-id 200801271126.23774.jfabiani@yolo.com
Whole thread Raw
In response to Re: A select DISTINCT query? - followup Q  (Mike Ginsburg <mginsburg@collaborativefusion.com>)
Responses Re: A select DISTINCT query? - followup Q  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Mike Ginsburg
Date:
Subject: Re: A select DISTINCT query? - followup Q
Next
From: Tom Lane
Date:
Subject: Re: A select DISTINCT query? - followup Q