I have a database table which has three relevant fields, firstly a user id, then one is a number of submitted nodes, the other is a sum of the “score” for each node.
I need to be able to run a query which will return the users with the highest average scores, but my SQL-fu is not where it could be.
Cheers!
Here’s what you need. It’s important to cast your int data types to something that handles decimals, or you’ll get inaccurate averages:
Good luck!
-Michael