LaundroMat
Programmer
Hi,
Suppose I have these tables:
I would want to get a list of how many top scores each user has. I got as far as:
This gives me a list of all top scores, and their owners. Can I do a COUNT() of all this, grouped by user in the same statement, or would I have to issue two queries? If so, how do I store the result of the first query in a temporary table (dropped immediately after use)?
Suppose I have these tables:
Code:
game: game_id, gamename
score: user_id, game_id, score
user: user_id, username
Code:
SELECT score, username, gamename
FROM score, user, game
WHERE score.user_id = user.user_id
AND score.game_id = game.game_id
GROUP BY game.game_id;