Exercise: Filter Groups
Find grades with average marks > 75.
Solution
sql
1SELECT grade, AVG(marks) AS avg
2FROM students
3GROUP BY grade
4HAVING AVG(marks) > 75;
Find grades with average marks > 75.
1SELECT grade, AVG(marks) AS avg
2FROM students
3GROUP BY grade
4HAVING AVG(marks) > 75;