What are the manager ids for managers who are in charge of 4 or more employees?
select manager_id from employees group by manager_id having count(employee_id) >= 4
What are the distinct department ids for the departments they belong to?
select distinct department_id from employees group by department_id, manager_id having count(employee_id) >= 4