I have a mysql table called RATING with this structure:
ID, USERNAME, RATING, RATER, MONTH
I want to be able to show a league table of users ordered by their average rating for the current month.
For example:
1, Bob, 10, Rita, JUL
2, Bob, 8, Sue, JUL
3, Rita, 9, Bob, JUL
4, Sue, 4, Rita, JUL
5, Rita, 10, Sue, JUL
I want a SQL query which would produce these results:
Rita: 9.5
Bob: 9
Sue: 4
Any ideas please?
Many thanks
Oliver.