[eluser]harman[/eluser]
hi please help me in this problem it's not CI related its General SQL please help me to over come this problem
i am creating star rating system i can calculate the total votes, avg. rating but now i need top rated 10 items how can i calculate rating weight-age : here is my db table
Code:
id rating product_id
1 5 120
2 2 120
3 2 120
4 4 25
5 5 25
in short: can anybody provide me SQL query to calculate top 10 rated items