Antw: duplicates

Поиск
Список
Период
Сортировка
От Gerhard Dieringer
Тема Antw: duplicates
Дата
Msg-id s8edf696.073@kopo001
обсуждение исходный текст
Список pgsql-sql
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 subscribersgroup by user_name having count(*) > 1;

Gerhard





В списке pgsql-sql по дате отправления:

Предыдущее
От: Jan Varga
Дата:
Сообщение: subquery returnig more than one field
Следующее
От: "Bryan White"
Дата:
Сообщение: Re: duplicates