Sample e-commerce data
Updated 3 November 2026. Fictional U.S. businesses and people, generated with a fixed seed.
What is in it
Each row is one fictional online order in 2024: date, customer, ship-to state, device, traffic source, main category, items, order value after any discount code, shipping fee (free from $50), payment method and whether anything was returned. Clothing is returned most often.
More practice tables like this one: all 14 newer sample datasets.
First rows
point at a column to light it up
| order_idtext | order_datedate | customer_idtext | statetext | devicetext | traffic_sourcetext | categorytext | itemsnumber | order_valuenumber | discount_codetext | shipping_feenumber | payment_methodtext | returnedyes/no |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EC910001 | 2024-11-28 | U02190 | TX | Mobile | Direct | Home & Kitchen | 1 | 32.61 | 5.99 | Card | FALSE | |
| EC910002 | 2024-01-30 | U02382 | OH | Mobile | Paid search | Books | 1 | 11.92 | 5.99 | Card | FALSE | |
| EC910003 | 2024-02-14 | U00634 | CA | Desktop | Social | Books | 2 | 23.57 | 5.99 | PayPal | FALSE | |
| EC910004 | 2024-08-25 | U01351 | MA | Desktop | Affiliate | Electronics | 5 | 436.41 | 0 | Apple Pay | FALSE | |
| EC910005 | 2024-07-15 | U00153 | LA | Mobile | Direct | Books | 2 | 28.72 | 5.99 | Card | FALSE | |
| EC910006 | 2024-03-21 | U00059 | TN | Mobile | Organic search | Beauty | 3 | 81.26 | 0 | PayPal | FALSE | |
| EC910007 | 2024-08-05 | U01353 | IL | Mobile | Direct | Books | 2 | 20.16 | 5.99 | Card | FALSE | |
| EC910008 | 2024-04-10 | U00492 | AZ | Mobile | Social | Beauty | 3 | 91.6 | 0 | Card | FALSE | |
| EC910009 | 2024-05-17 | U01417 | CT | Tablet | Direct | Clothing | 3 | 133.83 | 0 | Card | FALSE | |
| EC910010 | 2024-05-09 | U01299 | TN | Desktop | Direct | Home & Kitchen | 2 | 56.32 | HOLIDAY20 | 0 | PayPal | FALSE |
Order value by category
USD, 1,000-row file
Show as a table
| category | value |
|---|---|
| Electronics | $32,321 |
| Home & Kitchen | $17,031 |
| Clothing | $15,954 |
| Sports | $9,087 |
| Beauty | $7,113 |
| Toys | $4,391 |
| Books | $2,983 |
Data dictionary
| Column | Type | Meaning |
|---|---|---|
| order_id | text | Order number |
| order_date | date | Order date (2024) |
| customer_id | text | Customer number (2,500 customers) |
| state | text | Ship-to state |
| device | text | Desktop, Mobile or Tablet |
| traffic_source | text | How the shopper arrived |
| category | text | Main product category |
| items | integer | Items in the order |
| order_value | decimal | Merchandise total after discount (USD) |
| discount_code | text | Code used, blank if none |
| shipping_fee | decimal | 0 for orders of $50 or more |
| payment_method | text | Card, PayPal, Apple Pay or Gift card |
| returned | boolean | Any item returned (TRUE/FALSE) |
Practice questions
answers checked in SQL and in Python
Revenue and average order value by device?
Mobile $52,308.33 (avg $88.36); Desktop $28,344.79 (avg $86.15); Tablet $8,226.13 (avg $104.13)
Excel
=SUMIFS(I:I,E:E,"Mobile") and =AVERAGEIFS(I:I,E:E,"Mobile")SQL
SELECT device, ROUND(SUM(order_value),2) AS rev, ROUND(AVG(order_value),2) FROM ecommerce_orders GROUP BY device ORDER BY rev DESCFile: ecommerce-orders-1000
Return rate by category?
Clothing 25.3%; Electronics 9.9%; Toys 6.3%; Home & Kitchen 5.7%; Beauty 4.9%; Sports 4.8%; Books 4.0%
SQL
SELECT category, ROUND(100.0*SUM(returned)/COUNT(*),1) AS pct FROM ecommerce_orders GROUP BY category ORDER BY pct DESC, categoryFile: ecommerce-orders-1000
How many orders used a discount code?
222 orders
Excel
=COUNTA(J2:J1001)SQL
SELECT COUNT(*) FROM ecommerce_orders WHERE discount_code IS NOT NULLFile: ecommerce-orders-1000