Re: Remove duplicate rows and order by number of occurences

Поиск
Список
Период
Сортировка
От Mike Ellsworth
Тема Re: Remove duplicate rows and order by number of occurences
Дата
Msg-id 219951fd0901290927y4f6411c2l225d5409bb85a16d@mail.gmail.com
обсуждение исходный текст
Ответ на Remove duplicate rows and order by number of occurences  (postgres-novice@coreland.ath.cx)
Список pgsql-novice
> I thought that this might be the solution:
>
>  SELECT file_id FROM temp_tagged;
>    GROUP BY file_id
>    ORDER BY count (file_id) DESC;
>
> But apparently, it isn't.
>
> Any help would be appreciated.
>

Try
SELECT file_id, count(file_id) FROM temp_tagged GROUP BY file_id ORDER
BY count(file_id) DESC

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

Предыдущее
От: "Oliveiros Cristina"
Дата:
Сообщение: Re: Remove duplicate rows and order by number of occurences
Следующее
От: Carol Walter
Дата:
Сообщение: Re: Remove duplicate rows and order by number of occurences