Skip to content
SQLSimplified
hardschoolwindow-functions

Rank Students Within Each Course

Problem

Write a query that returns student_id, course_id, and score from the grades table, plus a score_rank column showing each score's rank within its own course, from highest score to lowest.

Try It

School (Students/Courses/Grades)

Loading database engine...

Hint

Solution

Search

Search lessons, functions, examples, and practice problems