我需要做一个查询,计算每个部门中有多少员工拥有超过 1 名员工并且员工人数为 6 或更多,我有:
Select DepartmentName, count(EmployeeNumber) as "Number of Employees"
From department d, employee e
Where d.DepartmentName = e.Department and e.EmployeeNumber <=6
Group by d.DepartmentName;
这满足了所有要求,除了关于拥有超过 1 名员工的部分,有没有办法只为从第一行返回 2 或更大的结果执行其余代码?