pg_exercises=# SELECT first_name, last_name
pg_exercises-# FROM employees
pg_exercises-# WHERE department_id
pg_exercises-# IN (SELECT department_id
pg_exercises(# FROM departments
pg_exercises(# WHERE department_name='IT');
first_name | last_name
------------+-----------
Alexander | Hunold
Bruce | Ernst
David | Austin
Valli | Pataballa
Diana | Lorentz
(5 rows)
Sample table: employees
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer