Re: Selecting dupes from table

Поиск
Список
Период
Сортировка
От Uros
Тема Re: Selecting dupes from table
Дата
Msg-id 1948949269.20030624131205@sir-mag.com
обсуждение исходный текст
Ответ на Re: Selecting dupes from table  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Selecting dupes from table  (Martijn van Oosterhout <kleptog@svana.org>)
Список 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 по дате отправления:

Предыдущее
От: Justin Clift
Дата:
Сообщение: Re: [pgsql-advocacy] interesting PHP/MySQL thread
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Selecting dupes from table