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

Join Shalyam Newsletter

Get exclusive insights with every issue: education, research and innovation news.

One email a week. Unsubscribe any time.