Exercise: Top Performing Courses
Find courses with average > 80.
Solution
sql
1SELECT * FROM (
2 SELECT course, AVG(marks) AS avg
3 FROM students GROUP BY course
4) AS t
5WHERE avg > 80;
Find courses with average > 80.
1SELECT * FROM (
2 SELECT course, AVG(marks) AS avg
3 FROM students GROUP BY course
4) AS t
5WHERE avg > 80;