我正在尝试生成一个SQL查询,以找出使用名字和姓氏在多个部门工作的员工
答案 0 :(得分:-1)
您在寻找此查询吗?这将为您提供在多个部门工作的员工。
select
FirstName, LastName, Count(Department)
from
Employee
where
FirstName = '<FirstName>' -- Add condition here
and LastName = '<LastName>'
group by
FirstName, LastName
having
Count(Department) > 1