Antw: duplicates

Gerhard Dieringer <dieringg@eba-haus.de>

From: "Gerhard Dieringer" <DieringG@eba-haus.de>
To: <allan.kelly@buildstore.co.uk>, <pgsql-sql@postgresql.org>
Date: 2000-04-07T12:54:02Z
Lists: pgsql-sql
Allan Kelly wrote:
...
> At the moment we use this cludge:
>
> select count(*), user_name from subscribers
>	group by user_name order by count;
>
>(I'm surprised I can't add 'where count > 1' but it seems conditionals on 
>aggregate fields are not allowed).


Try select count(*), user_name from subscribers
	group by user_name having count(*) > 1;

Gerhard