w3resource logo


SQL exercises

SQL Exercises, Practice, Solution - BASIC exercises on movie Database

Secondary Nav

SQL [10 exercises with solution]

Sample Database:

Movie database model

1. Write a query in SQL to find the name and year of the movies.  Go to the editor

Sample table : movie

Click me to see the solution

2. Write a query in SQL to find the year when the movie American Beauty released.  Go to the editor

Sample table : movie

Click me to see the solution

3. Write a query in SQL to find the movie which was released in the year 1999.  Go to the editor

Sample table : movie

Click me to see the solution

4. Write a query in SQL to find the movies which was released before 1998.  Go to the editor

Sample table : movie

Click me to see the solution

5. Write a query in SQL to return the name of all reviewers and name of movies together in a single list, alphabetically.  Go to the editor

Sample table : movie

Sample table : reviewer

Click me to see the solution

6. Write a query in SQL to find the name of all reviewers who have rated 7 or more stars to their rating.  Go to the editor

Sample table : reviewer

Sample table : rating

Click me to see the solution

7. Write a query in SQL to find the titles of all movies that have no ratings.  Go to the editor

Sample table : movie

Sample table : rating

Click me to see the solution

8. Write a query in SQL to find the titles of the movies with ID 905, 907, 917.  Go to the editor

Sample table : movie

Click me to see the solution

9. Write a query in SQL to find the list of all those movies with year which include the words Boogie Nights.  Go to the editor

Sample table : movie

Click me to see the solution

10. Write a query in SQL to find the ID number for the actor whose first name is 'Woody' and the last name is 'Allen'.  Go to the editor

Sample table : actor

Click me to see the solution

Practice Online


Go to top



Join our Question Answer community to learn and share your programming knowledge.

Help the community:

PHP: Loop

JavaScript: Delete duplicates in an array

Oracle: Round the number