w3resource
SQL exercises

SQL exercises on movie Database: Find the titles of all movies directed by the director whose first and last name are Woddy Allen

SQL movie Database: Subquery Exercise-5 with Solution

5. Write a query in SQL to find the titles of all movies directed by the director whose first and last name are Woddy Allen.

Sample table: movie


Sample table: director


Sample table: movie_direction


Sample Solution:

SELECT mov_title 
FROM movie 
WHERE mov_id=(
SELECT mov_id 
FROM movie_direction 
WHERE dir_id=(
SELECT dir_id 
FROM director 
WHERE dir_fname='Woody' AND dir_lname='Allen'
));

Sample Output:

                     mov_title
----------------------------------------------------
 Annie Hall
(1 row)

Practice Online


Movie database model

Query Visualization:

Duration:

Query visualization of Find the titles of all movies directed by the director whose first and last name are Woddy Allen - Duration

Rows:

Query visualization of Find the titles of all movies directed by the director whose first and last name are Woddy Allen - Rows

Cost:

Query visualization of Find the titles of all movies directed by the director whose first and last name are Woddy Allen - Cost

Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a query in SQL to find the movie title, year, date of release, director and actor for those movies which reviewer is unknown.
Next: Write a query in SQL to find the titles of all movies directed by the director whose first and last name are Woddy Allen.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming