Есть выборка max с groupby, подскажите, как добавить к запросу id, того самого, максимального значения?
`SELECT
"name",
"currency",
count("id") AS "games",
sum("amount") AS "bets",
max("amount") AS "max_amount",
max("profit") AS "max_profit"
FROM
"game" AS "Game"
WHERE
"Game"."user_id" = '123'
GROUP BY
"name",
"currency";`