Command Shift

SQL Exercises: SELECT

Read Exercises

These exercises all require you to read data from the movies table. To do this, you will need to use the SELECT keyword.

For more advanced queries, you will also need to use:

Having done that reading, let's get to the exercises:

  1. Write a query to get movie title, budget and release_date.
  2. Write a query to get a list of movies that have a website or homepage (title and homepage).
  3. Write a query to get a list of movies that are longer than 2 hours (title and runtime).
  4. Write a query to get the title and vote_average of the movie with most revenue.
  5. Write a query to get the title and vote_average of the movie with the least revenue.
  6. Write a query to get the movies with a vote average higher than 8.
  7. Write a query to get the movies released between 1 August 2015 and 1 January 2016.
  8. Write a query to get the count of all movies released after 1 January 2016.
  9. Write a query to get a list of the top 10 most popular movies.
  10. Write a query to get the count of all movies that have a vote average higher than 9 and were released before 2020.
  • How many different universities have been attended by each employee

On this page