You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
409 B
SQL

/*Write a query in SQL to display the full name (first and last name) of manager who is supervising 4 or more employees.
*/
SELECT first_name || ' ' || last_name AS Manager_name,department_id
FROM employees
WHERE employee_id IN
(SELECT manager_id
FROM employees
GROUP BY manager_id
HAVING COUNT(*)>=4);