Newbie here. Hoping to get some help on this. I'm writing an MySQL database application that is basically a list of songs where users vote on them. I'm trying to figure out how to count the numbers in a particular table's column. For example, I have the following:
I want to count or add up (SUM) each individual "Rating" and sort the list of songs on an ASP page in ascending (ASC) order based on its total rating.
Do I need to create a function to first add up the individual ratings, then select them in ascending order? If so, how would I write this code?
"SELECT * FROM Songs ORDER BY SongTitle ASC"