SELECT first_name, last_name, score, id
FROM players
WHERE game_id = 42
AND (score < 983 OR (score = 983 AND id < last_id))
ORDER BY score DESC, id DESC
LIMIT 5;
2 个赞
SELECT first_name, last_name, score, id
FROM players
WHERE game_id = 42
AND (score < 983 OR (score = 983 AND id < last_id))
ORDER BY score DESC, id DESC
LIMIT 5;