A group by query question
I am trying to make a SQL query in MS SQL Server that groups people togother by department and then has 2 columns. Each column is their status whether employee or manager. The field contains a count of how man people fit the criteria. The following code works for one column but i how do you
put in a second column with another WHERE statement?
SELECT dept, COUNT(*) AS manager,
FROM allEmployees
where (status = 'manager')
GROUP BY dept
| managers | employees
Dept1 | 3 | 5
Dept2 | 6 | 2
Any help would be greatly appreciated. Thanks.