I'm trying to figure out how to get avg(points) from each user in a table and then order them by the user with the highest average first...
here is what I have tried but with no luck:
Any help plaese :-)Code:
$sql = "SELECT *, AVG(points) points FROM nf_users WHERE played > 0 GROUP BY id ORDER BY points DESC LIMIT 100";
$qry = mysql_query($sql) or die(mysql_error());