Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Rank vs Dense Rank vs Row Number

For each student return name, score, RANK, DENSE_RANK and ROW_NUMBER ordered by score descending (break row-number ties by name).

Table schema

Scores(name VARCHAR(50), score INT)

Sample data

name | score
Amy | 90
Ben | 90
Cara | 80
Dev | 70

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.