Skip to content
Practice data

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.

Choosing data for analyst work? See SQL datasets for data analysts.

The datasets most SQL practice is built on.

Ecommerce Small · beginner

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

6 tables · 130 rows · CSV + SQL Explore →
Media Small · beginner

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

3 tables · 48 rows · CSV + SQL Explore →
Marketing Small · intermediate

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

5 tables · 161 rows · CSV + SQL Explore →
HR Small · intermediate

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

4 tables · 57 rows · CSV + SQL Explore →
Ecommerce Large · intermediate

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

7 tables · 426,024 rows · PARQUET + SCHEMA Explore →
Finance Large · advanced

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

5 tables · 343,840 rows · PARQUET + SCHEMA Explore →

Browse all datasets

9 datasets · 47 tables · 1,397,461 rows

Filters
Domain
Level
Size
Format
Practices
  • Garden Shop

    Ecommerce Runs in browser

    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
  • Movie Rentals

    Media Runs in browser

    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
  • Website Analytics

    Marketing Runs in browser

    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
  • Employee Directory

    HR Runs in browser

    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
  • Ecommerce Orders

    Ecommerce Runs in browser

    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
  • Banking Transactions

    Finance Runs in browser

    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
  • SaaS Subscriptions

    Finance Runs in browser

    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
  • Marketing Campaigns

    Marketing Runs in browser

    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
  • Messy Student Records

    Education Runs in browser

    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.