Premium · One online retailer, 30,377 customers, six markets, two years
E-commerce Retail: Orders, Payments and Returns
Two years of an online store's orders, payments, returns and refunds, reconciled to the cent
E-commerce Retail: Orders, Payments and Returns is a $15 synthetic dataset of 7 tables and 436,126 rows. The full pack holds every row, the answers with their SQL and a checker that grades yours; the free preview comes first.
436,126 rows in 7 linked tables for Fernhill Supply, an invented online retailer selling home, kitchen, electronics, apparel, beauty, books, sports and toys to shoppers in six markets (United States, United Kingdom, Germany, Canada, France, Netherlands), January 2024 to December 2025: 30,377 customers, 420 products, 78,980 orders, 202,780 order lines, a payment for every order, 17,786 returns with their refunds and 26,803 reviews.
What sets it apart is the money trail. Every order's subtotal is its lines, its total is the subtotal less the discount, plus tax, plus shipping, and its payment is captured for exactly that total. Every refund is what was paid for the line that came back (its share of the discount taken off, its tax added back, shipping kept), so no order is ever refunded more than it was paid, and most refunds are partial: 15,537 of 15,872 orders with a return were refunded part of what was paid. Returns come only from delivered orders, after delivery; refunds follow the return by a few days; returns still in the post at the close are pending.
Preview or full
Free preview or full pack
The preview is a slice of the same data with the keys intact, enough to load it and check it fits before you pay.
Free preview
149 KB- A slice of every table, keys intact
- A README of every table
- The project brief and questions
Full pack, $15
9.4 MB- Every row of every table (only in the full pack)
- A README of every table (also in the preview)
- The project brief and questions (also in the preview)
- The answers, each with its SQL (only in the full pack)
- A checker that grades your answers (only in the full pack)
- A Postgres schema and loader (only in the full pack)
- The audit results (only in the full pack)
- The blueprint that made these rows (only in the full pack)
Only in the full pack
Uses
What it is built for
Testing an AI analyst or a BI tool
the answer key gives the right value for every standard e-commerce KPI in every month and names the usual wrong query (counting cancelled orders in revenue, reading a return rate over lines that were never delivered, averaging line totals instead of orders).
Returns and refunds analytics
return rate by category, reason and month, refund timing, partial refunds, net sales after refunds, reconciled with payments.
E-commerce dashboards
gross and net sales, orders and average order value by month and market, the holiday peak, year-on-year growth, channel and payment mix, discounts.
Customer analytics
cohorts by first order, repeat purchase, lifetime value, the share the best customers carry.
Database and pipeline demos
load Postgres in one step with every foreign key enforced; seven tables that join on real keys.
A retail analytics portfolio project
the kit's trading-review brief and its 15 graded questions.
Project kit
A portfolio project you can check yourself
A brief from the head of e-commerce and the finance director at an online retailer, 15 questions from warm-up to stretch, and an answer key to grade against. Every answer was worked out twice on these files, in DuckDB SQL and separately in pandas, and the kit was written only when the two agreed.
The brief
FY2025 trading review: growth, the peak, returns and the customers who come back
From the head of e-commerce and the finance director at an online retailer · 1 January 2024 to 31 December 2025
- BRIEF.mdthe request, from the head of e-commerce and the finance director at an online retailer
- QUESTIONS.md15 questions, each asking for one value in a stated form
- load.sqlevery table into DuckDB with the right types
- check.pygrades your answers, names the misreading a wrong one matches
- solutions/the answer key and the SQL behind every answer
- WRITEUP_TEMPLATE.mdthe two pages a hiring manager reads
What the checker says
$ python kit/check.py kit/my_answers.csv
Q04 wrong that is the answer when you compare the number of orders instead of the salesA wrong answer is named for the mistake it matches, such as the wrong rows in a denominator or a mean where a median is asked, without giving the answer away. --reveal shows one answer and its SQL when you want it.
- Warm-up
- 3
- Core
- 8
- Stretch
- 4
Read all 15 questions
Warm-up
- Q01. Orders in 2025. How many orders placed in 2025 were not cancelled?
- Q02. Gross sales in 2025. What were gross sales in 2025: the lines of the orders not cancelled that were placed in 2025?
- Q03. Buyers in 2025. How many different customers placed at least one order not cancelled in 2025?
Core
- Q04. Growth. By how much did gross sales in 2025 exceed gross sales in 2024? Answer as a percentage of 2024.
- Q05. The peak. What share of 2025's gross sales came from orders placed in November and December?
- Q06. Average order value. What was the average order value in 2025: gross sales over the orders not cancelled? Answer in dollars to two decimal places.
- Q07. Return rate. What share of the lines of delivered orders ordered in 2025 were returned?
- Q08. Refunds paid. How much was refunded to customers in 2025: the refunds paid out (refund_status 'refunded') with a refund date in 2025?
- Q09. Net sales. For the orders placed in 2025, what was collected after refunds: the captured payments for those orders less the refunds paid out on them?
- Q10. Apparel returns. What share of the delivered apparel lines (category 'Apparel') ordered over the two years came back?
- Q11. How the Netherlands pays. What share of the captured payments for orders shipped to the Netherlands were made with iDEAL?
Stretch
- Q12. The 2024 customers. Of the customers whose first order not cancelled in the two years was placed in 2024, what share placed another order not cancelled in 2025?
- Q13. The best customers. What share of the two years' gross sales came from the busiest tenth of buyers by spend (the top 10% of the customers with an order not cancelled, ranked by their gross sales, rounded down to a whole number of customers)?
- Q14. Refund timing. For the returns refunded, what is the median number of days from the return arriving to the refund being paid?
- Q15. What discounts cost. What share of 2025's gross sales was given back as order discounts (the discount amounts over the subtotals of the orders not cancelled)?
A worked answer
Q01. Orders in 2025. How many orders placed in 2025 were not cancelled?
Answer: 42,790
SELECT count(*) FROM orders WHERE status <> 'cancelled' AND year(placed_at) = 2025The other answers, with their SQL, are in the full pack.
In the data
What the full files show
Computed from every row of the full dataset when it was packaged, not drawn as a target. The free preview is a slice of the same data.
Gross sales by month, 2024 against 2025
- 2024
- 2025
Share of delivered lines returned, by month ordered
- Jan9.5%
- Feb8.5%
- Mar8.5%
- Apr8.5%
- May8.5%
- Jun8.5%
- Jul8.5%
- Aug8.5%
- Sep8.5%
- Oct8.5%
- Nov10.5%
- Dec12.5%
How each market pays
- United States0%64.3%14.9%0%0%13.7%
- United Kingdom0%64.7%14.9%0%0%13.1%
- Germany0%12.4%28%26%17.3%5.8%
- Netherlands71%8%4.5%0%5%3.5%
- ideal
- card
- paypal
- invoice
- direct debit
- apple pay
How it behaves
Measured on the files you download
Each of these is computed from the delivered rows when the dataset is packaged, not written as a target.
- Gross sales: $3,900,000 in 2024, $5,148,001 in 2025 (+32.0%); January 2025 -54% on December 2024.
- Baskets through the year: $113 to $128 of lines an order; lines an order 1 29.1%, 2 25.6%, 3 21.4%, 4 13.2%, 5 6.6%.
- Customers: 30,377 accounts; 20,879 bought in the two years, 9,189 never ordered; signed up from February 2021; markets United States 62%, United Kingdom 12%, Germany 8%, Canada 7%, France 6%, Netherlands 5%.
- Best sellers: the top fifth of 420 products are on 82.2% of lines; a product under $25 is on 626 lines on average, one at $100 or more on 197; 290 products with five or more reviews; 24 of them average under 3.5 stars; 0 orders with a product on two lines.
- Tax by market: Canada 5%, 13%, 15%; France 20%; Germany 19%; Netherlands 21%; United Kingdom 20%; United States 0%, 6%, 8%, 10%.
- Returns: wrong size 45.1% of apparel returns, defective 41.0% of electronics returns; refund timing refunded a median 4.1 days after the return arrived (10th to 90th percentile 1.8 to 7.8); returns still pending at the close were made from 28 December 2025.
- Payments: ideal only in Netherlands; instant_transfer only in Germany; invoice only in Germany; klarna only in Netherlands; processor fees card 3.20% at the median, PayPal 3.95%, iDEAL $0.31 flat.
- Discounts: 38.1% of orders carry a discount, 5% on 31.4%, 10% on 36.9%, 15% on 21.1%, 20% on 10.6%.
- Ratings: 1 star 6.7%, 2 star 6.4%, 3 star 16.8%, 4 star 34.8%, 5 star 35.2%.
- Channels: web 58.1%, mobile_app 30.0%, marketplace 11.9%.
- Christmas Day: 0.64x and 0.61x a median December day's orders in 2024 and 2025.
Audit
44 of 44 checks pass
Re-run on the delivered files by an independent script with plain pandas. The results ship in INTEGRITY.json.
- every key filled and unique, every reference resolving (11 references, 0 orphans); a line's customer is its order's, and a return or review names the line's own order, product and buyer;
- gross sales in every month equal to the stated sales to the cent, orders and cancellations in every month as stated, returns within one line of each month's stated rate; the answer key agrees with the files;
- every line its quantity times its unit price, every subtotal its lines, every total its subtotal less discount plus tax plus shipping; one payment per order, captured for its total when paid, voided when cancelled, pending while unpaid; each month's captured payments equal to the totals of the orders paid that month;
- every refund what was paid for its line, no order refunded more than its total, returns only from delivered orders and after delivery, refunds after their return;
- an order's times in order (placed, paid, shipped, delivered) and its status the last step they reach, no order before its customer signed up, no product sold before it was listed, reviews after delivery, nothing after the close, open orders only in the close's last days;
- lifetime orders and value equal to each customer's orders, every order shipped to its customer's country, every town in one region and country, no order naming a product on two lines, each market's orders at its own tax rates;
- the behaviour above: the peak and the quiet months, peaks made of more orders, repeat and returning customers, best sellers, returns by category, payment methods by market, ratings.
All 44 checks
- ✓ every table has a unique, filled primary key: 7 tables, 436,126 rows
- ✓ every reference resolves: 11 references, 0 orphans
- ✓ a line's customer is its order's, and a return or review names the line's own order, product and buyer: 5 links read
- ✓ every order has exactly one payment: 78,980 payments for 78,980 orders
- ✓ no order names a product twice: a cart keeps one line a product, its quantity counting the units: 0 orders with a product on two lines
- ✓ a line is returned at most once, and its returned flag says whether it was: 17,786 lines returned
- ✓ revenue from orders not cancelled (the lines' totals, by the month ordered) equals the stated revenue in every month: 24 of 24 months to the cent; $215,019 in January 2024 to $787,706 in December 2025
- ✓ 2025 is larger than 2024 in every month and in the year: $3,900,000 in 2024, $5,148,001 in 2025 (+32.0%)
- ✓ November and December are each year's two largest months, December the larger: against an average January to October month: November 2024 1.87x, December 2024 2.31x, November 2025 1.87x, December 2025 2.14x
- ✓ January and February are each year's two quietest months, January falling from the December peak: January 2025 -54% on December 2024
- ✓ orders placed, cancelled ones too, equal the stated orders in every month: 24 of 24 months exact; 1,960 to 6,617 a month
- ✓ orders cancelled are the stated share of each month's orders, within one order: 24 of 24 months; 4.5% over the two years (3,556 orders) against 4.5% stated
- ✓ delivered lines returned are the stated share of each month's delivered lines, by the month ordered, within one line: 24 of 24 months; 9.4% over the two years (17,786 lines); 8.5% in a usual month, 12.5% on December's orders
- ✓ the answer key's revenue and return rate agree with these files in every month: 20 KPIs in the key
- ✓ every line's total is its quantity times its unit price, to the cent: 202,780 lines
- ✓ every order's subtotal is the sum of its lines, to the cent: 78,980 orders
- ✓ every order's discount, tax and total add up: the discount to the cent below, subtotal less discount, plus tax on what is left, plus shipping
- ✓ a payment settles its order: captured for the order's total when it was paid, voided when it was cancelled, pending while unpaid: captured 75,345, voided 3,556, pending 79
- ✓ each month's captured payments equal the totals of the orders paid that month: 24 months
- ✓ every refund is what was paid for the line returned: its total less the order's discount, plus the order's tax: 17,786 returns
- ✓ no order is refunded more than it was paid: 15,872 orders with a return; at most 100% of an order's total; shipping is never refunded
- ✓ partial refunds: 15,537 of 15,872 orders with a return were refunded part of what was paid (the other lines kept, or the shipping); 1,759 orders returned more than one line; multi-line orders are 70.9% of all orders
- ✓ returns come only from delivered orders, after delivery
- ✓ a refund is paid after its return, and only refunded returns carry a refund date: refunded 17,099, rejected 452, pending 235
- ✓ refund timing: refunded a median 4.1 days after the return arrived (10th to 90th percentile 1.8 to 7.8); returns still pending at the close were made from 28 December 2025
- ✓ processing fees follow each method's price: a percentage and a fixed part (capped for bank debits), a flat fee for iDEAL, nothing for a gift card or a payment not captured: card 3.20% at the median, PayPal 3.95%, iDEAL $0.31 flat
- ✓ no order is placed before its customer signed up
- ✓ an order's times are in order: placed, paid, shipped, delivered
- ✓ an order's status is the last step its times reach: delivered 74,081, cancelled 3,556, shipped 947, paid 317, placed 79
- ✓ every line is dated at its order's time
- ✓ nothing happens after the close, and every order falls in the two years: orders 01 Jan 2024 to 31 Dec 2025
- ✓ orders still open at the close were placed in its last weeks: 1,343 open, the earliest placed 24 December 2025
- ✓ every review is by the customer who bought the line, after it was delivered: 26,803 reviews
- ✓ every product was listed before it first sold
- ✓ each customer's lifetime orders and lifetime value are their orders, and what their orders not cancelled came to
- ✓ every order ships to its customer's own country: United States 62%, United Kingdom 12%, Germany 8%, Canada 7%, France 6%, Netherlands 5%
- ✓ each market's orders carry its own tax: European orders their country's standard VAT, Canadian orders GST alone or with the provincial part, US orders a state's sales tax: Canada 5%, 13%, 15%; France 20%; Germany 19%; Netherlands 21%; United Kingdom 20%; United States 0%, 6%, 8%, 10%
- ✓ every town belongs to one region and one country: 244 towns in 64 regions
- ✓ customers: 30,377 accounts; 20,879 bought in the two years, 9,189 never ordered; signed up from February 2021
- ✓ repeat buyers: 66.0% of buyers ordered more than once; 3.61 orders a buyer (median 2, most 57)
- ✓ a few customers buy far more often than the rest: the busiest tenth of buyers place 38.1% of orders
- ✓ customers come back: buyers whose first order in the window was in 2024 order again in 2025: 44.1% of 11,137; buyers who joined before the month 71.4% to 96.8% of each month's buyers
- ✓ best sellers carry most of the lines: the top fifth of 420 products are on 82.2% of lines
- ✓ cheaper things sell more often: a product under $25 is on 626 lines on average, one at $100 or more on 197
- ✓ peaks are made of more orders, not bigger ones: the average order stays within 15% of its median every month: $113 to $128 of lines an order
- ✓ Christmas Day: 0.64x and 0.61x a median December day's orders in 2024 and 2025
- ✓ each market pays as its shoppers do: some methods are used in one market only: ideal only in Netherlands; instant_transfer only in Germany; invoice only in Germany; klarna only in Netherlands
- ✓ payment methods by market: Canada: card 64%, paypal 15%, apple_pay 14%, bank_transfer 4%, gift_card 3%; France: card 64%, paypal 15%, apple_pay 13%, bank_transfer 4%, gift_card 4%; Germany: paypal 28%, invoice 26%, direct_debit 17%, card 12%, gift_card 6%, apple_pay 6%, instant_transfer 5%; Netherlands: ideal 71%, card 8%, direct_debit 5%, paypal 4%, klarna 4%, gift_card 4%, apple_pay 4%; United Kingdom: card 65%, paypal 15%, apple_pay 13%, bank_transfer 4%, gift_card 3%; United States: card 64%, paypal 15%, apple_pay 14%, bank_transfer 4%, gift_card 3%
- ✓ discounts: 38.1% of orders carry a discount, 5% on 31.4%, 10% on 36.9%, 15% on 21.1%, 20% on 10.6%
- ✓ why things come back depends on what they are: wrong size most often in apparel, defects in electronics: wrong size 45.1% of apparel returns, defective 41.0% of electronics returns
- ✓ ratings lean high, with a tail of disappointed buyers: 1 star 6.7%, 2 star 6.4%, 3 star 16.8%, 4 star 34.8%, 5 star 35.2%
- ✓ products by rating: 290 products with five or more reviews; 24 of them average under 3.5 stars
- ✓ channels: web 58.1%, mobile_app 30.0%, marketplace 11.9%
- ✓ lines an order: 1 29.1%, 2 25.6%, 3 21.4%, 4 13.2%, 5 6.6%
- ✓ categories: Apparel 120, Electronics 62, Home & Kitchen 54, Books 47, Sports & Outdoors 43, Beauty 36, Grocery 32, Toys & Games 26
Tables
7 tables, 436,126 rows
Every table in the zip with what it holds, its rows and its columns. The bars are on a log scale, so the small reference tables still show.
- order_itemsOrder lines: order, product, customer, time ordered, category, list price, unit price paid, quantity, line total, whether it was returned202,780 rows · 11 cols
- ordersEvery order: customer, time placed, channel (web, app, marketplace), status, paid, shipped, delivered and cancelled times, ship-to country, discount percent and amount, shipping fee, tax rate and amount, subtotal and total78,980 rows · 17 cols
- paymentsOne payment per order: amount, method (card, PayPal, Apple Pay, gift card, bank transfer, iDEAL, Klarna, invoice, direct debit, instant transfer), time paid, status captured, voided or pending, processor fee78,980 rows · 7 cols
- customersShopper accounts: name, email, country, region, city, street address, postal code and phone in their market's form, signup date, marketing opt-in, lifetime orders and lifetime value30,377 rows · 13 cols
- reviewsProduct reviews by the buyer of the line after delivery: product, customer, time, rating 1 to 5 and band, review text, verified purchase26,803 rows · 10 cols
- returnsReturned lines: the line and its order, time returned, reason, refund amount, refund status refunded, pending or rejected, time refunded17,786 rows · 8 cols
- productsThe catalogue: SKU, name, category, brand, list price, variant, date listed, whether still on sale420 rows · 9 cols
Explore
Every table, profiled
Each column's type, spread, empties and most common values, measured from the full CSVs. Switch to the first rows to see the data as it sits in the file.
order_items.csv
202,780 rows · 11 columns · 3 foreign keys
- Home & Kitchen23%
- Apparel21%
- Books16%
- Sports & Outdoors12%
- Beauty10.0%
- 3 more values · 19%
Keys
Every join resolves
11 foreign keys, 909,084 references checked against the table each one points at. None points at a row that does not exist.
order_items
- order_idorders.order_id202,780 rows checked0 orphans
- product_idproducts.product_id202,780 rows checked0 orphans
- customer_idcustomers.customer_id202,780 rows checked0 orphans
orders
- customer_idcustomers.customer_id78,980 rows checked0 orphans
payments
- order_idorders.order_id78,980 rows checked0 orphans
returns
- item_idorder_items.item_id17,786 rows checked0 orphans
- order_idorders.order_id17,786 rows checked0 orphans
reviews
- item_idorder_items.item_id26,803 rows checked0 orphans
- order_idorders.order_id26,803 rows checked0 orphans
- product_idproducts.product_id26,803 rows checked0 orphans
- customer_idcustomers.customer_id26,803 rows checked0 orphans
In the zip
What you get
- CSVs: one file per table, with a header row and ISO dates.
- README.md: what each table holds, how the data behaves (measured), what was checked and what to know.
- ANSWER_KEY.md: the truth behind the rows: what happened, when, where it shows and the query that finds it.
- INTEGRITY.json: the 44 audit checks and their results.
- RECIPE.json: the Misata blueprint that made these exact rows, seed 20261128.
- kit/: the project kit: the brief, 15 questions, load.sql for DuckDB, check.py, the answer key with its SQL, and the write-up template.
All 27 files
- data/customers.csv4.3 MB
- data/products.csv33 KB
- data/orders.csv12.3 MB
- data/order_items.csv15.7 MB
- data/payments.csv4.6 MB
- data/returns.csv1.5 MB
- data/reviews.csv3.7 MB
- README.md14 KB
- INTEGRITY.json11 KB
- RECIPE.json100 KB
- load_postgres.sql532 B
- CERTIFICATE.json19 KB
- answer_key/answer_key.csv33 KB
- answer_key/answer_key.json43 KB
- schema_postgres.sql4 KB
- story.json5 KB
- kit/BRIEF.md2 KB
- kit/QUESTIONS.md3 KB
- kit/README.md1 KB
- kit/WRITEUP_TEMPLATE.md2 KB
- kit/check.py3 KB
- kit/load.sql848 B
- kit/my_answers.csv85 B
- kit/questions.json4 KB
- kit/solutions/ANSWER_KEY.md9 KB
- kit/solutions/key.json8 KB
- kit/solutions/solutions.sql3 KB
Before you use it
Things to know
- Gross sales are the lines of orders not cancelled, by the month the order was placed.
subtotalis the same sum on the order;total_amountadds tax and shipping and takes off the discount. - A return rate is read over the lines of delivered orders, by the month they were ordered: a line still on its way at the close, or on a cancelled order, could not come back.
- Each order is taxed at its market's rate: the standard VAT of the UK (20%), Germany (19%), France (20%) and the Netherlands (21%), Canada's GST alone or with the provincial part (5%, 13% or 15%), and a US state's sales tax (0%, 6%, 8% or 10%).
tax_amountis that rate on the subtotal less the discount; amounts stay in US dollars. - The discount is the order's discount percent of its subtotal, to the cent below.
- A refund is the line total less the order's discount percent, plus the order's tax rate on what is left; shipping is never refunded.
refund_amountis filled for pending and rejected returns too; onlyrefund_status = 'refunded'rows carryrefunded_atand are money paid back. processor_feeis each method's published price on the amount captured: card and Apple Pay 2.9% + $0.30, PayPal 3.49% + $0.49, Klarna 2.99% + $0.35, invoice 3.29% + $0.35, instant transfer 1.4% + $0.27, SEPA direct debit 1% + $0.22 up to $4.30, bank transfer 0.8% up to $5, iDEAL a flat $0.31 (EUR 0.29), a gift card nothing.- An order has one payment. A cancelled order's payment is voided; an order placed in the close's last days and not yet paid has a pending one.
- Orders still open at the close (placed, paid or shipped) were all placed in its last week.
- Many accounts signed up before 2024, and some never ordered in the two years;
lifetime_ordersandlifetime_value_usdcount the orders not cancelled in the window. - Everything is invented: no real company, customer, person or record is represented.
Questions
Before you buy
Is this real data?
What do I get?
Can I try it before buying?
How was it checked?
Is there a project to do with it?
Can I use it commercially?
What should I know before using it?
Can I get a bigger or different version?
Want it bigger, in another setting, or with your own columns? Have us build it or make it in Studio.
More premium datasets
All 12Weekly sales, at regular price and on promotion
Grocery chain, 10 stores, fiscal 2024 and 2025
Two fiscal years of a grocery chain, from the shelf to the receipt
Answer key
- baseline_units
- price_effect
- promo_lift
- +7 more
- Rows
- 2,790,852
- Tables
- 14
- Checks
- 117 of 117
Free preview18-question projectProfile and previewCard spending each month, debit and credit
2,500 US households at five banks and seven card issuers, two years
Five banks' raw statement lines, with every label behind them
Answer key
- description
- merchant_name
- category
- +6 more
- Rows
- 7,627,186
- Tables
- 14
- Checks
- 50 of 50
Free previewProfile and previewMRR at each month's end
One SaaS company, 3,431 accounts, three years
Three years of one company's MRR, deals, customers, billing and support
- Rows
- 208,956
- Tables
- 12
- Checks
- 55 of 55
Free preview17-question projectProfile and preview

