From the following tables, write a SQL query to find who directed a movie that casted a role as ‘Sean Maguire’
- برمجة سي كيو ال sql
- 2021-09-03
- mhanasmh00489829403
الأجوبة
SELECT dir_fname, dir_lname, mov_title
FROM director
JOIN movie_direction
ON director.dir_id=movie_direction.dir_id
JOIN movie
ON movie_direction.mov_id=movie.mov_id
JOIN movie_cast
ON movie_cast.mov_id=movie.mov_id
WHERE role='Sean Maguire';
OR
SELECT dir_fname, dir_lname, mov_title
FROM director, movie_direction, movie, movie_cast
WHERE director.dir_id=movie_direction.dir_id
AND movie_direction.mov_id=movie.mov_id
AND movie.mov_id=movie_cast.mov_id
AND movie_cast.role='Sean Maguire';
Sample Output:
dir_fname | dir_lname | mov_title ----------------------+----------------------+---------------------------------------------------- Gus | Van Sant | Good Will Hunting (1 row)
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال