Online store
A mid-size home goods store selling on its website, app and a marketplace. Orders from January 2024 to June 2025.
customers
One row per customer account. Key: customer_id. 150 rows in the larger version, 70 in the smaller.
| customer_id | int | Unique id. |
| full_name | text | Name on the account. |
| text, nullable | NULL when the customer never gave one (marketplace buyers). | |
| country | text | Two-letter country code. |
| signup_date | date | Day the account was created. |
| referral_source | text, nullable | organic, paid_search, social, referral or email. NULL when unknown. |
products
The catalog. Key: product_id. 36 rows in the larger version, 24 in the smaller.
| product_id | int | Unique id. |
| product_name | text | Display name. |
| category | text | Kitchen, Home, Outdoors, Books, Beauty or Toys. |
| list_price | numeric(10,2) | Current list price in USD. |
| launched_on | date | First day on sale. |
orders
One row per order. Key: order_id. 700 rows in the larger version, 300 in the smaller.
| order_id | int | Unique id. |
| customer_id | int | Who placed it. |
| ordered_at | timestamp | When it was placed (UTC). |
| status | text | completed, cancelled or refunded. |
| channel | text | web, app or marketplace. |
| shipping_fee | numeric(10,2) | Shipping charged, USD. |
| coupon_code | text, nullable | Coupon used, NULL if none. |
order_items
One row per product in an order. Key: order_id, product_id. 1,266 rows in the larger version, 563 in the smaller.
| order_id | int | The order. |
| product_id | int | The product. |
| quantity | int | Units bought. |
| unit_price | numeric(10,2) | Price paid per unit, after discounts, USD. |
returns
Items sent back. Key: return_id. 79 rows in the larger version, 32 in the smaller.
| return_id | int | Unique id. |
| order_id | int | The original order. |
| product_id | int | The product returned. |
| returned_on | date | Day the return arrived. |
| quantity | int | Units returned. |
| reason | text, nullable | damaged, wrong_item, not_as_described or changed_mind. NULL when not given. |
Questions on this database
- First and last product name and launch date by categoryThe catalog team is tidying the product list and wants a quick profile of each category.
- Orders, coupon orders and customers by channelThe marketing lead wants one summary line per sales channel. Use every row in orders, whatever its status.
- Revenue by category, including empty onesFinance wants revenue for every product category in the catalog. Revenue is quantity * unit_price from order_items, counting completed orders only.
- Average order value by channelThe growth team tracks average order value (AOV) for each sales channel. Only completed orders count.
- Customers grouped by how many orders they placedThe CRM team wants to split 2025 shoppers into three groups by how often they bought.
- Units sold and units returned by categoryQuality wants to compare how many units each category sold with how many came back.
- Email-referred customers and their completed ordersThe lifecycle team wants to see how well the email channel converts. Look at every customer whose referral_source is 'email'.
- Refund value of wrong-item returns by categoryCustomer care is costing out "wrong item" returns. Look at rows in returns whose reason is 'wrong_item'.
- Kitchen revenue by customer country, four tablesThe merchandising team wants to know where the Kitchen range sells. A customer's country is customers.country.
- Units ordered and units returned per orderOperations reviews every completed order placed in August 2024 (from 2024-08-01 00:00 up to, but not including, 2024-09-01 00:00) for returns.
- Products at the three highest price pointsMerchandising is building a "premium shelf" from the products at the three highest distinct list_price values in the whole catalog.
- Best seller on each sales channel in the first quarterThe channel managers want to know what sold best on their channel in the first quarter of 2025.
- First order value by acquisition channelMarketing wants to know which channel brings in the biggest first orders. A customer's first order is their earliest order with status completed.
- Top three products in each category, with tiesMerchandising wants the best sellers in each category. Rank products within their category by units sold on completed orders, most units first.
- Products that make up 80 percent of revenueMerchandising wants a Pareto list: the smallest set of best-selling products that together reach at least 80% of completed-order revenue.
- Customers whose first order used a couponMarketing wants to know which coupons win new customers. A customer is "won by a coupon" when their very first order carried a coupon.
- Orders above the customer's own average orderThe retention team wants to spot big-ticket moments for each customer: orders that are larger than that customer's usual order.
- Share of revenue by categoryThe merchandising team wants to see how completed sales split across product categories.
- Refund rate by count and by valueFinance tracks refunds in two ways: how many orders were refunded, and how much money they were worth.
- Return rate by product categoryOperations wants to know which categories come back the most. For each category, the return rate is the units returned divided by the units sold.
- Order status counts per channelThe operations lead wants one row per sales channel showing how its orders ended up.
- Products per price band, empty bands includedMerchandising groups the catalog into four price bands by list_price in products.
- Customers who buy in the app but never on the webThe growth team wants a list of customers who shopped only in the app during the second quarter of 2025, so they can test a web-checkout nudge on them.
- Customer contact labels with missing emailsThe email tool wants one display label per customer.
- Customers by referral source, with unknown shownMarketing wants a headcount of customers by where they came from.
- Orders that did not use a couponThe marketing team wants to see how many orders were placed without the WELCOME10 coupon.
- Year-over-year completed orders by monthFinance compares each month of 2025 with the same month of 2024. Count orders with status completed, assigned to the calendar month of ordered_at.
- Year-to-date units against the same period last yearMerchandising tracks year-to-date unit sales and asks whether 2025 is ahead of 2024 at the same point in the year.
- Products bought together in the same orderMerchandising wants to place related products next to each other. Find pairs of products that customers often put in the same basket.
- Customers with no completed order in MarchMarketing wants to send a "we miss you" email to customers who did not buy in March 2025.
- Products that sold but were never returnedMerchandising wants a list of "safe" products: ones that customers buy and keep.
- Customers with several accounts under one emailCustomer support wants to merge accounts that belong to the same person.
- Emails shared by accounts that disagree on countryBefore merging duplicate customer accounts, the data team wants to find the ones that cannot be merged automatically: the same email is used by several...
- Revenue to date per customer by sign-up quarterFinance wants a first look at customer lifetime value: how much each sign-up cohort has spent so far, per customer.
- Rolling retention after day 30 by first-order quarterThe store wants to know how many new customers order again after their first month.
- Customers by email domainThe email team wants to know which mailbox providers their customers use, but the email column was typed in by hand and is not always tidy.
- Customers who bought from two categoriesMarketing plans a cross-sell email for customers who have already shown interest in both cooking and reading.
- Data test for direct buyers with no usable emailThe shop's receipts are sent by email, so every customer who orders through the web or app channel must have an email.