pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gerhard Dieringer <DieringG@eba-haus.de>
To: allan.kelly@buildstore.co.uk
To: pgsql-sql@postgresql.org
Subject: Antw: duplicates
Date: Fri, 07 Apr 2000 14:54:02 +0200
Message-ID: <s8edf696.073@kopo001> (raw)


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






Message-ID: <s8edf696.073@kopo001>
Permalink:  ../s8edf696.073@kopo001/
Also on:    postgresql.org/message-id/s8edf696.073@kopo001

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: DieringG@eba-haus.de, allan.kelly@buildstore.co.uk
  Subject: Re: duplicates
  In-Reply-To: <s8edf696.073@kopo001>
  References: <s8edf696.073@kopo001>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox