Let me start by a example that doesnt solve your whole need. If you want the MaxScore for each user in each game the query looks like this:
SELECT
User.ID,
User.Name,
Game1.ID as MaxScoreGameID,
Max(Game1.Score) as MaxScore,
FROM
User
JOIN
Game1
ON
Game1.UserID = User.ID
GROUP BY
User.ID, User.Name, Game1.ID
The standard JOIN
and the GROUP BY
needs to list all the parameters that should be respected by the aggregation. (From a business logic point of view it should only list User.ID and Game1.ID, since User.Name is dependent from User.ID, but that is a technical detail and you would probably not want to redesign your database because of that.)
You could rewrite the statement above to retrieve Min(Game1.Rank) as BestRank
instead. Now the question remains on how to extend that query to list both values at the same time.
You have to decide if that can be done in the same join (meaning that the highest score always is the best rank too) or if a seperate join is required (meaning that some other score than MaxScoreGameID could have the BestRank - maybe in a game you are trying to get close to 0 points?).
IF two separate joins are required, you have to join Game1
twice.
SELECT
User.ID,
User.Name,
g1max.ID as MaxScoreGameID,
Max(g1max.Score) as MaxScore,
g1min.ID as BestRankGameID,
Min(g1min.Rank) as BestRank,
FROM
User
JOIN
Game1 g1max
ON
g1max.UserID = User.ID
JOIN
Game1 g1min
ON
g1min.UserID = User.ID
GROUP BY
User.ID, User.Name, g1max.ID, g1min.ID