178.Rank Scores


  • 0
    C

    select Scores.Score,c.rank from Scores left join (select Score,(@i:=@i+1) as Rank from (select distinct Score from Scores Order By Score DESC) as b,(select @i:=0) as a ) as c on Scores.Score = c.Score order by c.Score DESC;


Log in to reply
 

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