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.

8 lines
287 B

/*Write a subquery that returns a set of rows to find all departments that do actually have one or more employees assigned to them.
SELECT department_name
FROM departments
WHERE department_id IN
(SELECT DISTINCT(department_id)
FROM employees);