programming-examples/sql/SubqueriesHRDatabase/Write a query that will identify all employees who work in departments located in the United Kingdom.sql

16 lines
449 B
MySQL
Raw Permalink Normal View History

2019-11-18 14:05:53 +01:00
/*Write a query that will identify all employees who work in departments located in the United Kingdom.
*/
SELECT first_name
FROM employees
WHERE department_id IN
(SELECT department_id
FROM departments
WHERE location_id IN
(SELECT location_id
FROM locations
WHERE country_id =
(SELECT country_id
FROM countries
WHERE country_name='United Kingdom')));