Skip
Arish's avatar

157. GROUP BY with ORDER


Sorting Grouped Results

sql
1SELECT course, COUNT(*) AS count
2FROM students
3GROUP BY course
4ORDER BY count DESC;

Most popular courses first.