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

From hubert depesz lubaczewski
Subject Re: A select DISTINCT query?
Date
Msg-id 20080127163547.GB22276@depesz.com
Whole thread Raw
In response to Re: A select DISTINCT query?  (Phil Rhoades <phil@pricom.com.au>)
List pgsql-general
On Mon, Jan 28, 2008 at 03:32:18AM +1100, Phil Rhoades wrote:
> SELECT count(*) as cnt, name FRoM tst GROUP BY name HAVING cnt = 1 ;
> ERROR:  column "cnt" does not exist
> LINE 1: ...ount(*) as cnt, name FRoM tst GROUP BY name HAVING cnt = 1 ;

having count(*) = 1;

depesz

--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA.  here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)

pgsql-general by date:

Previous
From: Phil Rhoades
Date:
Subject: Re: A select DISTINCT query?
Next
From: "Pavel Stehule"
Date:
Subject: Re: A select DISTINCT query?