I have a 5 star rating system at my side and i want to view top 3 best rated, I am using the below sql query:
SELECT Ranking, Total_value FROM <Table> ORDER BY Rating DESC LIMIT 3;
but it don't show the top 3, it shows the 3 with the highest number, if 10 people have voted for one thing, and 20 people have voted for another thing, the one with 20 votes have the highest number, but not necessary have the highest rating, so how do i divide the number of votes with the total ranking?? so it shows the 3 with the best ranking
Hope someone can help me? and understand my question :)