What are department ids for departments with managers managing more than 3 employees?
select distinct department_id from employees group by department_id, manager_id having count(employee_id) >= 4