Where to get relational datasets for SQL practice
By the Ground team
Choose a dataset with multiple related tables, documented keys and enough rows to make joins and aggregation meaningful. Ground's examples and public billing fixture provide starting points for SQL practice.
Choose exercises before data
Use customers and orders for joins, line items for revenue aggregation and event histories for window functions. Include customers without orders to distinguish inner joins from left joins.
Example request
Create a retail database with customers, orders, order_items and products, including repeat customers and customers with no orders.
Load into a local engine
DuckDB can query Parquet directly; PostgreSQL is useful for practicing constraints and transactions. Use an isolated database and read the schema before writing queries.
Write checks alongside queries
Confirm that joins do not multiply amounts unexpectedly. Compare row counts before and after joins, and verify totals against a known result.
Common questions
Is one large CSV enough to practice SQL?
It is fine for filters and aggregations, but related tables are better for joins and relational reasoning.
Try it with your own dataset
Get started, see pricing or use the API.
Review security and privacy when evaluating Ground for your team.