st_rage
07-21-2007, 11:40 AM
Hi, this is my first post. I have 2 fields, Name and Vote. I would like to get 5 names with the most vote and put it in DESC order. The most vote is placed top and followed by the second most.
SELECT Name, SUM( vote )
FROM table_vote
GROUP BY Name
DESC
LIMIT 5
This is what I have and it's not correct. Any help is appreciated. Thanks!
SELECT Name, SUM( vote )
FROM table_vote
GROUP BY Name
DESC
LIMIT 5
This is what I have and it's not correct. Any help is appreciated. Thanks!