I'm not sure if count(*) is what I'm looking for, but if I had to guess...
I currently have a table with many unique entries. For example:
id | vote
1 5
1 5
1 6
1 6
1 6
1 2
2 3
2 3
2 9
2 9
2 9
2 4
2 6
What I want to do is for each ID, find out which of the 'vote' options has >=2 entries, and then sort those in descending order.
So what I'm looking to get is a return of something like:
For id 1:
6, 5
For id 2:
9, 3
Is there any simplified way of doing this?
Thanks