以下脚本应返回部门名称和这些部门中的员工人数,市场营销、执行和销售部门的员工人数为“0”,但返回的值不是“0”,而是“1”。我该如何纠正?
select Department, Departments.DepartmentID, count(*) as 'NumOfEmps'
from Departments
left join Employees
on Employees.DepartmentID = Departments.DepartmentID
group by Departments.DepartmentID,Department