programming-examples/sql/SQLMovieDatabase/15. Write a query in SQL to find the name of the director (first and last names) who directed a movie that casted a role for 'Eyes Wide Shut'.sql
2019-11-18 14:05:53 +01:00

16 lines
467 B
SQL

/*15. Write a query in SQL to find the name of the director (first and last names) who directed a movie that casted a role
for 'Eyes Wide Shut'.*/
SELECT dir_fname, dir_lname
FROM director
WHERE dir_id in (
SELECT dir_id
FROM movie_direction
WHERE mov_id in(
SELECT mov_id
FROM movie_cast WHERE role = ANY (
SELECT role
FROM movie_cast
WHERE mov_id IN (
SELECT mov_id
FROM movie
WHERE mov_title='Eyes Wide Shut'))));