SELECT scores.score,B.rank FROM
select A.score,@i:=@i+1 as rank
(SELECT DISTINCT score from scores GROUP BY score desc) A,
(SELECT @i=0) as it
ORDER BY scores.score desc
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.