Multiple Aggregates
Select several aggregate values at once.
Example
sql
1SELECT
2 COUNT(*) AS total,
3 MIN(marks) AS lowest,
4 MAX(marks) AS highest,
5 AVG(marks) AS average
6FROM students;Result
| total | lowest | highest | average |
|---|---|---|---|
| 25 | 45 | 98 | 76.5 |

Select several aggregate values at once.
1SELECT
2 COUNT(*) AS total,
3 MIN(marks) AS lowest,
4 MAX(marks) AS highest,
5 AVG(marks) AS average
6FROM students;| total | lowest | highest | average |
|---|---|---|---|
| 25 | 45 | 98 | 76.5 |