What are the unique ids of those departments where any manager is managing 4 or more employees.
select distinct department_id from employees group by department_id, manager_id having count(employee_id) >= 4