Re: Remove duplicate rows and order by number of occurences - Mailing list pgsql-novice

From Mike Ellsworth
Subject Re: Remove duplicate rows and order by number of occurences
Date
Msg-id 219951fd0901290927y4f6411c2l225d5409bb85a16d@mail.gmail.com
Whole thread Raw
In response to Remove duplicate rows and order by number of occurences  (postgres-novice@coreland.ath.cx)
List 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 by date:

Previous
From: "Oliveiros Cristina"
Date:
Subject: Re: Remove duplicate rows and order by number of occurences
Next
From: Carol Walter
Date:
Subject: Re: Remove duplicate rows and order by number of occurences