본문 바로가기

Oracle

[oracle] 중복제거 서브쿼리

select t.employee_id, t.last_name, t.department_id
from employees t
where 2<(select count(e.department_id)
               from employees e
               where t.department_id=e.department_id);