Für jeden value
, können Sie das gruppenweise Maximum
erhalten :
SELECT * FROM Scores NATURAL JOIN (
SELECT player_id, value1, value2, MAX(value3) value3 FROM Scores NATURAL JOIN (
SELECT player_id, value1, MAX(value2) value2 FROM Scores NATURAL JOIN (
SELECT player_id, MAX(value1) value1 FROM Scores
GROUP BY player_id) t
GROUP BY player_id) t
GROUP BY player_id) t
ORDER BY value1 DESC, value2 DESC, value3 DESC
Sehen Sie es auf sqlfiddle .