I have a leaderboard page on my website and players can upload their scores to it multiple times. I only want the page to display the player once, with their highest score.
I've tried the following but it only seems to display the first instance of a score added by the player, not the highest.
SELECT leaderboard_scores.*, leaderboard_users.*, MAX(leaderboard_scores.scoreTotal) AS score
LEFT JOIN leaderboard_users ON leaderboard_scores.scoreUser = leaderboard_users.userID
GROUP BY scoreUser
ORDER BY score ASC
There are 2 tables joined together for the scores and users.