Re: Selecting dupes from table - Mailing list pgsql-general

From Jean-Christian Imbeault
Subject Re: Selecting dupes from table
Date
Msg-id 3EF82892.9050501@mega-bucks.co.jp
Whole thread Raw
In response to Selecting dupes from table  (Uros <uros@sir-mag.com>)
Responses Re: Selecting dupes from table  (Bruno Wolff III <bruno@wolff.to>)
List 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



pgsql-general by date:

Previous
From: Uros
Date:
Subject: Selecting dupes from table
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Selecting dupes from table