delete from employee a
where employee_id in (
select employee_id
from employee b
where b.department_id > a.department_id )
delete from employee a
where employee_id in (
select employee_id
from employee b
where b.department_id > a.department_id )