15 lines
437 B
SQL
15 lines
437 B
SQL
/*Write a query to find out which employees have a manager who works for a department based in the US.
|
|
|
|
*/
|
|
|
|
SELECT first_name,last_name FROM employees
|
|
WHERE manager_id IN
|
|
(SELECT employee_id
|
|
FROM employees
|
|
WHERE department_id IN
|
|
(SELECT department_id
|
|
FROM departments
|
|
WHERE location_id IN
|
|
(SELECT location_id
|
|
FROM locations
|
|
WHERE country_id='US'))); |