Rank Scores


  • 0
    L
    set @Rank=0;
    select Scores.Score ,t2.Rank from Scores,(select Score,@Rank:=@Rank+1 Rank from (select distinct Score from Scores order by Score desc) t) t2 where Scores.Score=t2.Score order by Scores.Score desc
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.