Sobes.tech
Junior — Senior

Selection of departments with more than two employees

livecode

Task condition

The task is to list the names of all departments where the number of employees exceeds two.

SELECT name
FROM department
WHERE id IN (
    SELECT department_id
    FROM employee
    GROUP BY department_id
    HAVING COUNT(*) > 2
);