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 -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -