Skip
Arish's avatar

151. Practice - MAX by Group


Exercise: Max Age per Grade

Find maximum age in each grade.

Solution

sql
1SELECT grade, MAX(age) AS max_age
2FROM students
3GROUP BY grade;