Skip to content
← All datasets
Dataset collection

Free Sales Datasets for Analysis: CSV, Excel, and SQL

Download free sales data as CSV, Excel, and SQLite files: 237,537 retail order lines, subscription invoices, campaign revenue, and unit sales, 2023 to 2025.

Start with the ecommerce orders if you want transactions: 100,000 orders and 237,537 order lines, with a price and discount on every line and a unit cost for every product. Choose SaaS subscriptions for recurring billing, marketing campaigns for revenue attributed to ad spend, or inventory for units sold against stock. All four are synthetic and cover 2023 to 2025.

Ready-made practice

Sales data ready to download

Start from one table if you want a result quickly, or from the linked tables if you want to practice joins. Free with an account.

  • Flat sales file (CSV)

    sales_lines.csv: 237,537 order lines from 2023 to 2025 with customer and product fields joined in.

    Get the flat file →
  • Sales practice workbook (Excel)

    39,922 order lines from July to December 2025, eight tasks, and an Answers sheet.

    Get the workbook →
  • Sales star schema (CSV)

    fact_sales with 237,537 order lines plus customer, product, and date dimensions, for Power BI or Tableau.

    Get the star schema →
  • Query the sales tables online

    A free SQL editor that runs in your browser on a smaller sample of the same tables.

    Open the SQL editor →
  • Five graded SQL questions on sales

    Joins across customers, orders, and order lines, checked in your browser.

    Start the questions →
  • PivotTable tasks on sales data

    Revenue by category and month, margin, and distinct orders, each with the expected answer.

    Open PivotTable practice →
Compare your options

Choose a dataset for the work you want to complete

DatasetSales recordsStructureSingle-table filePick it for
Ecommerce Sales & ReturnsOrders and order lines with price, discount, payments, and refunds6 related tablesFlat sales CSV: one row per order lineRevenue by product, category, customer segment, and month
SaaS Subscriptions & ChurnMonthly subscription invoices and payment attempts5 related tablesAnalysis-ready workbook: one row per invoiceBilled against collected revenue by plan and region
Marketing Campaigns & ConversionsConversions with attributed revenue, beside daily ad spend4 related tablesAnalysis-ready workbook: one row per campaign per dayRevenue per advertising dollar by channel and campaign
Inventory & Supply ChainSale movements in units by product and warehouse, with no price7 related tablesNone for sales: filter inventory_movements to saleUnits sold against stock, receipts, and purchase orders
Checked against the files

What each sales dataset contains

Row counts and dates are from the published release of each dataset, version 1.0.0. A dataset appears more than once when it holds more than one kind of sales record.

Sales tables, row counts, and dates

DatasetTableOne row isRowsDates coveredAmount columns
Ecommerce Sales & ReturnsordersOne placed order100,0002023-01-01 to 2025-12-31subtotal, tax_amount, shipping_amount, order_total
Ecommerce Sales & Returnsorder_itemsOne order line237,537Dated by its orderquantity, unit_price, discount_amount, line_total
Ecommerce Sales & ReturnspaymentsOne payment attempt105,3882023-01-01 to 2025-12-31amount, with payment_status succeeded or failed
Ecommerce Sales & ReturnsrefundsOne refund7,9102023-01-05 to 2025-12-31amount
SaaS Subscriptions & ChurninvoicesOne monthly invoice for a subscription85,4482023-01-04 to 2025-12-28amount_due
SaaS Subscriptions & ChurnpaymentsOne payment attempt87,2872023-01-06 to 2025-12-29amount, with payment_status succeeded or failed
Marketing Campaigns & ConversionsconversionsOne lead that converted to a trial or a purchase39,6962023-01-05 to 2025-12-21revenue: above zero on 16,691 purchases, zero on 23,005 trials
Inventory & Supply Chaininventory_movements, where movement_type is saleOne sale of a product from a warehouse55,4412023-01-01 to 2025-12-31quantity_change in units, negative for a sale; no price

Download formats

Every dataset is released as source CSV files, a SQLite database, an analysis-ready Excel workbook, and a Parquet file. The SQLite database holds the same tables as the CSV files.

DatasetSource tablesAnalysis-ready workbook and ParquetPractice files
Ecommerce Sales & Returns6 CSV files and a SQLite databaseOne row per order: 100,000 rowsFlat sales CSV, Excel practice workbook, star schema, dirty data pack
SaaS Subscriptions & Churn5 CSV files and a SQLite databaseOne row per invoice: 85,448 rowsExcel practice workbook with the 45,237 invoices issued in 2025
Marketing Campaigns & Conversions4 CSV files and a SQLite databaseOne row per campaign per day of spend, with attributed revenue: 11,240 rowsExcel practice workbook with the same 11,240 rows
Inventory & Supply Chain7 CSV files and a SQLite databaseOne row per purchase order: 18,000 rows. These are purchases, not salesExcel practice workbook with the same 18,000 purchase orders
Start here

A checked first sales query

Run this against the ecommerce SQLite database. It joins order lines to their orders, leaves out cancelled orders, and totals item revenue by year.

SELECT
  substr(o.ordered_at, 1, 4) AS order_year,
  COUNT(DISTINCT o.order_id) AS orders,
  ROUND(SUM(oi.line_total), 2) AS item_revenue
FROM order_items AS oi
JOIN orders AS o ON o.order_id = oi.order_id
WHERE o.order_status <> 'cancelled'
GROUP BY order_year
ORDER BY order_year;
  • Expected for version 1.0.0: 2023 has 32,301 orders and 19,479,382.85 in item revenue.
  • Expected for version 1.0.0: 2024 has 32,244 orders and 19,606,792.80 in item revenue.
  • Expected for version 1.0.0: 2025 has 32,479 orders and 19,633,685.49 in item revenue.
  • The three years add up to 97,024 orders and 58,719,861.14.
  • The flat sales CSV gives the same revenue: leave out cancelled rows and sum line_total.
Practical guidance

Start with a useful result

Define the sale before you total it

The ecommerce files hold several amounts. line_total is item revenue after line discounts and before tax and shipping: 60,483,519.62 across all order lines, or 58,719,861.14 once the 2,976 cancelled orders are left out. order_total adds tax and shipping. Successful payments total 63,458,562.67 and refunds total 3,387,902.65. Say which one your report uses.

Pick the dataset by the question

For revenue by product, customer, or month, and for margin, use the ecommerce orders. For billed against collected revenue by plan, use SaaS subscriptions. For revenue per advertising dollar, use marketing campaigns. For units sold against stock and receipts, use inventory, which records each sale as a quantity with no price.

Sum each table at its own grain

Grain is what one row of a table represents. An order can have several lines and several payment attempts. Joining order lines to payments before summing repeats each line once per attempt, and the item revenue for orders that were not cancelled grows from 58,719,861.14 to 62,015,901.22. Total each table first, or use the flat sales file, which has one row per order line.

Synthetic data with realistic structure

All four datasets are generated to model fictional businesses, so their totals are not industry benchmarks. The structure is what you meet at work: keys, statuses, discounts, failed payments, refunds, and cancelled orders. That makes them suitable for practice, teaching, and portfolio projects, with credit to the source.

Where can I download a free sales dataset?

Every dataset on this page is free to download with an account. The ecommerce dataset is the usual starting point: 100,000 orders and 237,537 order lines from January 2023 to December 2025, with customers, products, payments, and refunds in linked tables. It comes as CSV files, a SQLite database, an Excel workbook, and a Parquet file.

Is there a sales dataset in Excel format?

Yes, two. The Excel practice workbook has 39,922 order lines from July to December 2025 with eight tasks and an Answers sheet, and its amounts are stored as numbers. The analysis-ready workbook has one row per order, 100,000 rows, but stores decimal amounts as text, so convert them before you sum. The flat sales CSV also opens in Excel.

Is there a single sales CSV file?

Yes. The flat sales file is a ZIP that contains sales_lines.csv: one row per order line, 237,537 rows and 18 columns, with the order date, order status, customer country and segment, product name and category, quantity, unit price, discount, line total, line cost, and gross profit already joined in. No lookups are needed before you start.

Which dataset has sales by product?

The ecommerce dataset. It has 1,200 products in six categories, 200 in each, and every order line records the product, quantity, unit price, and discount, so you can rank products and categories by revenue or margin. The inventory dataset has 2,500 products and records 55,441 sale movements in units by product and warehouse, without prices.

Is this real sales data?

No. The four datasets are synthetic: generated to model a fictional online store, subscription business, marketing team, and warehouse network. They contain no real customers or companies, and their totals are not benchmarks. They are licensed CC BY 4.0, so you can use them in a course, a tutorial, or a portfolio project if you credit Analytics Engineering.

What is the difference between sales, payments, and refunds in these files?

They are separate events in separate tables. An order line records what was sold and for how much. A payment records an attempt to collect, which can fail: the ecommerce data has 105,388 attempts. A refund records money returned later: 7,910 rows. Item revenue, cash collected, and cash net of refunds are three different totals, so choose one and name it.

Turn sales tables into a model you can trust

Practice the joins, grain checks, and metric definitions that keep a revenue number the same in every report.

Explore data-modeling practice