RANK SCORES


  • 0
    S
     select a.score,
    (SELECT COUNT(distinct(score))+1 FROM scores WHERE score>a.score) AS rank
    from scores a 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.