Give the distinct department ids of departments in which a manager is in charge of 4 or more employees?
SELECT DISTINCT department_id FROM employees GROUP BY department_id ,  manager_id HAVING COUNT(employee_id)  >= 4
distinct department ids refers to DISTINCT(department_id); in charge of 4 or more employees refers to HAVING COUNT(employee_id) >= 4; manager role is implied by grouping by manager_id along with department_id;