I have a request:
SELECT COUNT(*) as votes, a.member_id FROM ballots a WHERE ballot_id = 1 GROUP BY a.member_id
which gives something like:
votes member_id 1 paul 5 mike 3 noynoy 10 andy 2 noel
I would like to get the string "andy" because he got the highest "votes".
How do I change my query to do this?
Thanks in advance for your help :)
source share