From d195f59ebd9cbe90f5cbcccaf3e59ad9d9b1f998 Mon Sep 17 00:00:00 2001 From: Rodolfo P A <6721075+rodoufu@users.noreply.github.com> Date: Fri, 2 Jun 2023 15:17:12 -0300 Subject: [PATCH] Create rank-scores.sql --- leetCode/sql/rank-scores.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 leetCode/sql/rank-scores.sql 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 +;