RE: [HACKERS] Should the following work...?

Jackson, DeJuan <djackson@cpsgroup.com>

From: "Jackson, DeJuan" <djackson@cpsgroup.com>
To: The Hermit Hacker <scrappy@hub.org>, pgsql-hackers@postgreSQL.org
Date: 1999-03-30T17:42:21Z
Lists: pgsql-hackers
> select id 
>   from clients 
>  where id = ( select id 
>                 from clients 
>                where count(id) = 1 ) ;
> The error I get is that you can't do the AGGREGATE int he 
> WHERE clause,
> but this is with a pre-v6.5 server too...technically, should 
> the above be
> possible?
I believe instead of WHERE that should be a HAVING clause.
But I'm not sure PostgreSQL can handle a HAVING in a sub-select.

	-DEJ