SQL Practice Datasets
Free SQL practice datasets you can download or query in your browser, with no account. Each one is a relational schema with the joins, nulls, and messy edges real reporting work has, from 48 rows you can check by eye up to 426,024 rows where the aggregate is the only answer you get.
- Free, no account No sign-up, no email, no attribution. Invented data, public domain under CC0 1.0, commercial use included.
- Query in your browser All 9 datasets open in the playground. Nothing to install.
- 78 questions with answers Plus 18 guided lessons, beginner to advanced. Answers stay hidden until you ask.
- CSV, Parquet, and SQL files 47 tables across 9 datasets. Every file listed, with how to load it.
Choosing data for analyst work? See SQL datasets for data analysts.
Start here
The datasets most SQL practice is built on.
Garden Shop
Orders, products, inventory, suppliers, and customers for store-operations SQL practice.
Try answering
- Which products are below their reorder level?
- How much shipped revenue did each month produce?
Joins Aggregates GROUP BY +5
Movie Rentals
Movies, customers, and rental history for compact join, aggregate, and NULL practice.
Try answering
- Which genres produce the most rental revenue?
- Which customers have the most rentals?
Joins Aggregates GROUP BY +2
Website Analytics
Sessions, pageviews, events, users, and campaigns for funnel and attribution practice.
Try answering
- Which channels drive the highest purchase rate?
- Which pages are viewed most often?
Joins Aggregates GROUP BY +6
Employee Directory
Departments, employees, projects, and assignments, with a reporting line for self-join practice.
Try answering
- Who reports to each manager, and who reports to nobody?
- What is the average salary and headcount per department?
Joins Self-joins Many-to-many +4
Ecommerce Orders
Customers, products, orders, line items, payments, and returns at realistic online-retail volume.
Try answering
- Which categories produce the most revenue after returns?
- How much did each month bill, and how does that compare to the month before?
Joins Many-to-many Aggregates +5
Banking Transactions
Accounts, merchants, and two years of posted transactions with no stored balance to read off.
Try answering
- What is the running balance on each account, in posted order?
- Which card payments look like a double charge?
Joins Aggregates GROUP BY +6
Browse all datasets
9 datasets · 47 tables · 1,397,461 rows
Filters
-
Orders, products, inventory, suppliers, and customers for store-operations SQL practice.
Tables: customers · products · categories · orders · order_items · suppliers
Joins · Aggregates · GROUP BY · NULL handling · Dates · CTEs · Top-N reports · INSERT / UPDATE / DELETE
6 tables, 130 rows, Small size, beginner level, CSV and SQL -
Movies, customers, and rental history for compact join, aggregate, and NULL practice.
Tables: movies · customers · rentals
Joins · Aggregates · GROUP BY · NULL handling · Top-N reports
3 tables, 48 rows, Small size, beginner level, CSV and SQL -
Sessions, pageviews, events, users, and campaigns for funnel and attribution practice.
Tables: users · campaigns · sessions · pageviews · events
Joins · Aggregates · GROUP BY · NULL handling · Dates · Window functions · CTEs · Funnels and rates · Attribution
5 tables, 161 rows, Small size, intermediate level, CSV and SQL -
Departments, employees, projects, and assignments, with a reporting line for self-join practice.
Tables: departments · employees · projects · assignments
Joins · Self-joins · Many-to-many · Aggregates · GROUP BY · NULL handling · Subqueries
4 tables, 57 rows, Small size, intermediate level, CSV and SQL -
Customers, products, orders, line items, payments, and returns at realistic online-retail volume.
Tables: categories · customers · products · orders · order_items · payments · returns
Joins · Many-to-many · Aggregates · GROUP BY · NULL handling · Dates · CTEs · Top-N reports
7 tables, 426,024 rows, Large size, intermediate level, PARQUET and SCHEMA -
Accounts, merchants, and two years of posted transactions with no stored balance to read off.
Tables: branches · merchants · customers · accounts · transactions
Joins · Aggregates · GROUP BY · NULL handling · Dates · Window functions · Subqueries · CTEs · Top-N reports
5 tables, 343,840 rows, Large size, advanced level, PARQUET and SCHEMA -
Organizations, plan intervals, invoices, and product usage for a B2B SaaS business.
Tables: plans · organizations · users · subscriptions · invoices · usage_events
Joins · Aggregates · GROUP BY · NULL handling · Dates · Window functions · Subqueries · CTEs · Funnels and rates
6 tables, 259,208 rows, Large size, advanced level, PARQUET and SCHEMA -
Channels, campaigns, ad groups, and two years of daily performance where every metric is a ratio.
Tables: channels · campaigns · ad_groups · daily_performance · conversions
Joins · Aggregates · GROUP BY · NULL handling · Dates · Window functions · CTEs · Top-N reports · Attribution
5 tables, 303,609 rows, Large size, intermediate level, PARQUET and SCHEMA -
Student, enrollment, and grade records merged from three schools, with the mixed formats, padding, and duplicates left to clean.
Tables: schools · courses · students · contacts · enrollments · grades
Joins · GROUP BY · NULL handling · Dates · Text cleanup · Window functions · CTEs
6 tables, 64,384 rows, Medium size, intermediate level, CSV and PARQUET and SCHEMA
Which one should I pick?
Start with a beginner dataset in a domain you already understand. The
SQL is the hard part, so the business rules should not be. Move to
intermediate once joins and
GROUP BY feel routine, and
reach for a larger dataset when you want aggregates you cannot verify
by eye.
Start with table shape
When you open a dataset, read the table descriptions first, then run a few row counts. That tells you which tables are lookup lists, which tables contain repeated activity, and where joins can duplicate rows.
Take the data with you
Every dataset guide has free download links, and what it offers
depends on the dataset. A small one ships raw CSVs plus a single
.sql file of CREATE TABLE
and INSERT statements that loads into PostgreSQL, MySQL, SQLite, or
DuckDB as-is, and into SQL Server with at most the small edit its
header
describes.
A bigger one ships CSV or Parquet with a DuckDB schema script
that creates the tables and loads them, plus a smaller browser
sample for the playground.
Each guide says which.
Want bigger or messier data?
The datasets here are built for practice, so their edges are deliberate rather than accidental. When you want real published data or one of the sample databases that SQL books and interviews assume you have seen, there is a curated list of free SQL datasets and practice sites elsewhere. Anything there under 10 MB loads straight into the playground here.