Skip to content
Datasets/Movie Rentals
Dataset

Movie Rentals SQL Practice Dataset

Movies, customers, and rental history for compact join, aggregate, and NULL practice.

Download this dataset, free

No account, no email, no attribution required — free for any use, including commercially. Take the single .sql file to load everything into PostgreSQL, MySQL, SQLite, DuckDB, or SQL Server, or grab the raw CSVs.

movie_rentals.sqlAll 3 tables, 48 rows, as CREATE TABLE and INSERT statements.Download →

Movie Rentals is a compact three-table dataset for practicing SQL without a large schema getting in the way. The catalog table describes each movie, the customer table identifies renters, and the rental history table links them together with dates and amounts.

Because some rentals have not been returned, the dataset is especially good for practicing IS NULL, left joins, Top-N reports, and grouped revenue summaries.

Schema

Schema · Movie RentalsView dataset schema3 tables
Table · movies

One row per movie in the catalog.

5 columns · 12 rows
movie_id inttitle textgenre textrelease_year intrating decimal
Table · customers

One row per customer.

5 columns · 10 rows
customer_id intfirst_name textlast_name textcity textjoined_date date
Table · rentals

One row per rental. Movies still out have a null returned_date.

6 columns · 26 rows
rental_id intcustomer_id intmovie_id intrental_date datereturned_date dateamount decimal

Best for

  • Joining rentals to customers and movies.
  • Counting, ranking, and summing activity by movie or customer.
  • Finding rentals that are still out with IS NULL.

Starter questions

  • Which genres produce the most rental revenue?
  • Which customers have the most rentals?
  • Which movies have not been returned yet?

Practice lessons