SQL practice datasets for data analysts
Practice the SQL work analysts actually do: join business tables, define reporting grain, calculate KPIs, investigate missing values, build funnels, compare time periods, and explain why a plausible number is wrong. These 9 datasets span 47 tables and 1,397,461 rows.
The data is invented, not scraped or presented as a real company. That makes the business edges deliberate and the files safe to reuse in a portfolio. Every dataset is free, downloadable, and queryable in the browser without an account.
Start with reports you can verify by eye
These compact datasets are best for learning table relationships and checking whether each result is correct. Use them for joins, NULLs, GROUP BY, date filters, inventory, employee hierarchies, and web funnels before scale makes mistakes harder to see.
-
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
Move to larger KPI and portfolio problems
These datasets are large enough that an aggregate is the only practical answer. They cover ecommerce revenue and returns, banking balances and transaction status, SaaS subscriptions and recurring revenue, and paid marketing performance and attribution.
-
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
Choose a dataset by analyst skill
Revenue and customer value
Start with Garden Shop or Ecommerce Orders.
Funnels and web behavior
Start with Website Analytics.
Recurring revenue and churn
Start with SaaS Subscriptions.
Finance and reconciliation
Start with Banking Transactions.
Campaign KPIs and attribution
Start with Marketing Campaigns.
Hierarchy and workforce reports
Start with Employee Directory.
Turn a dataset into practice
Use the SQL questions with tested answers when you want structured prompts, or compare the downloadable SQL and data formats before working in your own database client.