Rank Score Solution

  • 0

    Write your MySQL query statement below

    set @inc=0;
    select atab.score, btab.rank from scores atab,
    (select score, @inc:=@inc+1 as rank from ( select distinct score from scores order by score desc) a) btab where atab.score=btab.score order by atab.score desc;

Log in to reply

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