【发布时间】:2018-09-29 03:03:32
【问题描述】:
select ssn, count(*)
from (
select ssn, employee_id, is_active
from employee
where is_active ='Y'
)
group by ssn
having count(*) > 1
我想修改此查询以查找表中不止一次存在但具有不同employee_id 的所有ssn,其中至少一条记录具有is_active of Y。
【问题讨论】: