Question 5
Table Name: College
Relevant Table: College(Professor (Text), Department (text), Salary (INT))
| Professor | Department | Salary |
| John | Computer Science | 60,000 |
| Van der | Mechanical Engineering | 57,500 |
| Ackerman | Physics | 45,000 |
| Suyash | Mathematics | 52,000 |
| Simrit | Computer Science | 56,500 |
| Jessica | Computer Science | 55,000 |
| Jenny | Personality Development | 50,000 |
QUERY: Write a Query that returns all the departments and their aggregate salaries.
Execute: SELECT Department, SUM(Salary) AS AggregateSalary
FROM College GROUP BY Department;
FROM College GROUP BY Department;
Answer:
| Department | AggregateSalary |
| Computer Science | 171,500 |
| Mechanical Engineering | 57,500 |
| Physics | 45,000 |
| Mathematics | 52,000 |
| Personality Development | 50,000 |