My Accepted solution

  • 3

    Write your MySQL query statement below

    select a.Score, count(b.Score) as Rank
    from Scores as a,
    (select distinct Score
    from Scores) as b
    where a.Score <= b.Score
    group by a.ID
    order by a.Score desc

Log in to reply

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