sql - MySQL count row values WHERE column = value -
i have database looks pretty this:
i wanna make mysql query count votes each id , order them starting highest. want output like:
is possible without making 3 queries inside each other?
select name, sum(votes) total_votes mytable group 1 order 2 desc
Comments
Post a Comment