Re: Selecting dupes from table

From: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
To: Uros <uros(at)sir-mag(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Selecting dupes from table
Date: 2003-06-24 10:31:46
Message-ID: 3EF82892.9050501@mega-bucks.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Uros wrote:
>
> I want to list all entries with duplicate urls.
>
> I tried this:
>
> select id,url,title from directory where url IN
> (select url from directory group by url having count(url) > 1)
> ORDER by url;

Try:

select id,url,title from directory where group by id, url, title having
count(url) > 1 order by url;

Think it should work,

Jan-Christian Imbeault

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2003-06-24 10:32:53 Re: Selecting dupes from table
Previous Message Uros 2003-06-24 10:16:43 Selecting dupes from table