Exercise: Statistics
Get count, sum, and average of marks.
Solution
sql
1SELECT
2 COUNT(*) AS total_students,
3 SUM(marks) AS total_marks,
4 AVG(marks) AS average_marks
5FROM students;
Get count, sum, and average of marks.
1SELECT
2 COUNT(*) AS total_students,
3 SUM(marks) AS total_marks,
4 AVG(marks) AS average_marks
5FROM students;