Question 24
Table Name: College
Relevant Table: College(Professor (Text), Department (text), Salary (INT))
| Professor | Department | Salary |
| John | Computer Science | 60,000 |
| Van der | Mechanical Engineering | 55,000 |
| Ackerman | Physics | 45,000 |
| Suyash | Mathematics | 52,000 |
| Simrit | Computer Science | 56,500 |
| Jessica | Computer Science | 57,000 |
| Jenny | Personality Development | 50,000 |
QUERY: Write a query that returns every department and the number of professors in each one.
Execute: SELECT Department, COUNT(*) AS ProfessorCount
FROM College
GROUP BY Department;
FROM College
GROUP BY Department;
Answer:
| Department | ProfessorCount |
| Computer Science | 3 |
| Mechanical Engineering | 1 |
| Physics | 1 |
| Mathematics | 1 |
| Personality Development | 1 |