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

From Uros
Subject Re: Selecting dupes from table
Date
Msg-id 1948949269.20030624131205@sir-mag.com
Whole thread Raw
In response to Re: Selecting dupes from table  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Selecting dupes from table  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Hello Martijn,

Tuesday, June 24, 2003, 12:32:53 PM, you wrote:

MvO> On Tue, Jun 24, 2003 at 12:16:43PM +0200, Uros wrote:

MvO> How about:

MvO> Duplicate urls would be given by:

MvO> select url from directory group by url having count(*) > 1;

MvO> To get all the entries with those urls, something like:

MvO> select id,url,title from directory,
MvO> (select url from directory group by url having count(*) > 1) as list
MvO> where list.url = directory.url;

MvO> I hope I got the syntax right.


I tried that before but got error:

ERROR:  Column reference "url" is ambiguous

--
Best regards,
 Uros                            mailto:uros@sir-mag.com


pgsql-general by date:

Previous
From: Justin Clift
Date:
Subject: Re: [pgsql-advocacy] interesting PHP/MySQL thread
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Selecting dupes from table