diff --git a/leetCode/sql/rank-scores.sql b/leetCode/sql/rank-scores.sql new file mode 100644 index 0000000..32ae604 --- /dev/null +++ b/leetCode/sql/rank-scores.sql @@ -0,0 +1,9 @@ +# https://leetcode.com/problems/rank-scores +select + score, + dense_rank() over (order by score desc) as "rank" +from + Scores +order by + score desc +;