Skip to content

Commit d2dbf12

Browse files
authored
Create 178-rank-scores.sql
1 parent bb53750 commit d2dbf12

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

178-rank-scores.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Write your MySQL query statement below
2+
Select sc.Score,
3+
(Select count(*)+1 from (select distinct (Score) from Scores)
4+
as uniqeScores where Score > sc.Score) as rank
5+
from Scores sc order by sc.Score desc;

0 commit comments

Comments
 (0)