Exercise: Average per Grade
Find average marks in each grade.
Solution
sql
1SELECT grade, ROUND(AVG(marks), 2) AS avg_marks
2FROM students
3GROUP BY grade;
Find average marks in each grade.
1SELECT grade, ROUND(AVG(marks), 2) AS avg_marks
2FROM students
3GROUP BY grade;