DENSE_RANK

A window function assigning equal rank to peers without leaving gaps after ties.

What is DENSE_RANK in a relational database?

DENSE_RANK — A window function assigning equal rank to peers without leaving gaps after ties.

SELECT student_id,
       DENSE_RANK() OVER (ORDER BY score DESC) AS score_rank
FROM exam_result;

Level: Journeyman · More Database terms at this level

Updated