The following script should return the name of the departments and the number of employees located in these departments, in the departments of marketing, executive authority and sales there is "0", and instead of "0" the value "1 'is returned. How can I fix it?
select Department, Departments.DepartmentID, count(*) as 'NumOfEmps'
from Departments
left join Employees
on Employees.DepartmentID = Departments.DepartmentID
group by Departments.DepartmentID,Department

user1362208
source
share