select Scores.Score, row_num as Rank
(select t1.Score, @rank:=@rank+1 as row_num
(select distinct Score from Scores
order by Score desc) as t1) as t2
order by Scores.Score desc
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.