sql - MySQL count row values WHERE column = value -


i have database looks pretty this:

enter image description here

i wanna make mysql query count votes each id , order them starting highest. want output like:

enter image description here

is possible without making 3 queries inside each other?

select     name,     sum(votes) total_votes mytable group 1 order 2 desc 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -