SELECT DISTINCT user_id
FROM your_table
ORDER BY score DESC
LIMIT 10
Run Code Online (Sandbox Code Playgroud)
编辑:
SELECT DISTINCT *
FROM your_table
WHERE (user_id, score) IN (SELECT user_id, MAX(score) AS score
FROM your_table
GROUP BY user_id)
ORDER BY score DESC
LIMIT 10
Run Code Online (Sandbox Code Playgroud)