I have a scores
table:
id
user
score
date
Now, I can easily select a top 10 highscore with
SELECT user, score, date FROM scores ORDER BY score DESC
However, I'd like to include only one score per user, namely his highest. I would begin with something like
SELECT user, MAX(score) AS score FROM scores GROUP BY user ORDER BY score DESC
However, now I've lost the date
that highest score was recorded. How do I get it?