DEV Community

Miss Pooja Anilkumar Patel
Miss Pooja Anilkumar Patel

Posted on • Updated on

178. Leetcode Solution in Mysql

# Write your MySQL query statement below
select score,
    (select count(distinct score) + 1 
     from scores ss 
     where ss.score > s.score) `rank`
from scores s
order by score desc
Enter fullscreen mode Exit fullscreen mode

leetcode

challenge

here is the link for the problem:
https://leetcode.com/problems/rank-scores/

Top comments (0)