Skip to content
← All datasets
Dataset collection

Free SQL Practice Datasets With Multiple Tables

Practice joins, aggregation, window functions, and data modeling with downloadable datasets. Compare table structures and choose a practical project.

Use ecommerce data to work through joins and sales reporting. Choose subscriptions for time-based analysis, or inventory for reconciliation across operational records.

Compare your options

Choose a dataset for the work you want to complete

DatasetBest suited toStructureSQL setupMain challenge
Ecommerce Sales & ReturnsJoins, aggregation, and sales reporting6 related tablesTested SQLite filePreventing duplicated revenue across order lines and refunds
SaaS Subscriptions & ChurnRetention, cohorts, and window functions5 related tablesTested SQLite fileDefining active status from one subscription period per account
Marketing Campaigns & ConversionsAttribution and mixed-grain analysis4 related tablesTested SQLite fileJoining daily spend to individual leads without fanout
Inventory & Supply ChainReconciliation and operational modeling7 related tablesTested SQLite fileExplaining balances from opening stock and signed movements
Bike Sharing DemandTime-series aggregation and seasonal demand2 related tablesTested SQLite fileComparing hourly and daily grains correctly
Start here

A checked first query

Run this against the Bike Sharing SQLite database. It keeps the hourly grain and compares observed hours and average rentals by working-day status.

SELECT
  workingday,
  COUNT(*) AS observed_hours,
  ROUND(AVG(cnt), 1) AS average_hourly_rentals
FROM hour
GROUP BY workingday
ORDER BY workingday;
  • Expected for version 1.0.0: workingday 0 → 5,514 observed hours and 181.4 average rentals.
  • Expected for version 1.0.0: workingday 1 → 11,865 observed hours and 193.2 average rentals.
Practical guidance

Start with a useful result

Start with a question, then choose the tables

Write down the result you want before joining anything. Identify what one output row should represent, which tables contain the required information, and whether each relationship can create multiple matches. Check the row count and totals as you build the query.

From your first query to a reusable model

Begin with a filtered selection or grouped result. Add a related table when the question requires it. As the analysis grows, separate repeated logic into named steps and document the definitions that determine the answer.

Do I need a cloud data warehouse?

No. Download the published SQLite database and open it in a compatible local SQL tool. Start with the available files rather than building a larger platform just to complete the first exercise.

Practice the query, not just the download

Continue with a free SQL exercise that helps you check your joins, grouping, or time-based logic.

Explore free SQL practice