Rank Without Window Functions
Hard
Ranking Edge Cases
Compute each student's rank within their class (1 = highest, ties share a rank, next rank skipped) without window functions. Order by class, rank, name.
Table schema
Students(name VARCHAR(10), class VARCHAR(5), score INT)Sample data
name | class | score
Ann | X | 90
Bob | X | 90
Cy | X | 70
Dee | Y | 60
Eli | Y | 80
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.