Learn SQL
JOINS - Filtering and Ordering
40.4
Lesson

JOINs with ordering

Let’s say we want to display names and marks of students along with the name of the courses they are enrolled in, in the alphabetical order of the course names first, and then in the increasing order of marks scored by them.

In this case, we can add ordering to the JOIN result of students and courses with an ORDER BY clause.