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:
- The WHERE keyword and get familiar on how to use it in expressions
- Built-in SQL functions.
- GROUP BY keyword to group results
Having done that reading, let's get to the exercises:
- Write a query to get movie
title
,budget
andrelease_date
. - Write a query to get a list of movies that have a website or homepage (
title
andhomepage
). - Write a query to get a list of movies that are longer than 2 hours (
title
andruntime
). - Write a query to get the
title
andvote_average
of the movie with most revenue. - Write a query to get the
title
andvote_average
of the movie with the least revenue. - Write a query to get the movies with a vote average higher than 8.
- Write a query to get the movies released between 1 August 2015 and 1 January 2016.
- Write a query to get the count of all movies released after 1 January 2016.
- Write a query to get a list of the top 10 most popular movies.
- 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