Skip
Arish's avatar

153. Practice - SUM by Group


Exercise: Total Marks per Course

Sum marks by course.

Solution

sql
1SELECT course, SUM(marks) AS total_marks
2FROM students
3GROUP BY course;