Skip
Arish's avatar

220. Practice - Correlated 1


Exercise: Above Course Average

Find students above their course average.

Solution

sql
1SELECT name, course, marks FROM students s
2WHERE marks > (
3  SELECT AVG(marks) FROM students
4  WHERE course = s.course
5);