select tb1.Score, tb2.Rank from
(select Score from Scores order by Score desc) tb1
(select @rownum:=@rownum + 1 AS Rank, s.Score as Score from (select @rownum:=0) r,
(select distinct(Score) as Score from Scores order by Score desc) s) tb2
on tb1.Score = tb2.Score;
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.