Last updated
Analyze product returns, store-level product demand, and return-heavy products to support better merchandising decisions.
Analyze product returns, store-level product demand, and return-heavy products to support better merchandising decisions.
Your dataset contains five tables from a retail merchandising system: 1. A Products table with product_id, product_name, and category 2. A Stores table with store_id and store_name 3. An Orders table with order_id and the store_id where the order was placed 4. An Order_Items table with order_item_id, order_id, product_id, and quantity sold 5. A Returns table with return_id, order_item_id, quantity_returned, and refund_amount
| Column | Type | Key / Notes |
|---|---|---|
| product_id | INT | PK |
| product_name | VARCHAR(100) | |
| category | VARCHAR(50) |
| Column | Type | Key / Notes |
|---|---|---|
| store_id | INT | PK |
| store_name | VARCHAR(100) |
| Column | Type | Key / Notes |
|---|---|---|
| order_id | INT | PK |
| store_id | INT | FK |
| Column | Type | Key / Notes |
|---|---|---|
| order_item_id | INT | PK |
| order_id | INT | FK |
| product_id | INT | FK |
| quantity | INT |
| Column | Type | Key / Notes |
|---|---|---|
| return_id | INT | PK |
| order_item_id | INT | FK |
| quantity_returned | INT | |
| refund_amount | DECIMAL(10,2) |
Products — sample
| product_id | product_name | category |
|---|---|---|
| 1 | Wireless Earbuds | Electronics |
| 2 | Smart Watch | Electronics |
| 3 | Denim Jacket | Fashion |
| 4 | Running Shoes | Footwear |
| 5 | Backpack | Fashion |
Stores — sample
| store_id | store_name |
|---|---|
| 1 | Kolkata Store |
| 2 | Delhi Store |
Orders — sample
| order_id | store_id |
|---|---|
| 1001 | 1 |
| 1002 | 1 |
| 1003 | 2 |
| 1004 | 2 |
Order_Items — sample
| order_item_id | order_id | product_id | quantity |
|---|---|---|---|
| 1 | 1001 | 1 | 20 |
| 2 | 1001 | 4 | 15 |
| 3 | 1002 | 3 | 10 |
| 4 | 1003 | 2 | 25 |
| 5 | 1003 | 5 | 15 |
| 6 | 1004 | 1 | 10 |
Returns — sample
| return_id | order_item_id | quantity_returned | refund_amount |
|---|---|---|---|
| 1 | 1 | 2 | 2,400.00 |
| 2 | 2 | 1 | 900.00 |
| 3 | 4 | 3 | 3,600.00 |
| 4 | 5 | 1 | 750.00 |
This drill has four tasks: 1. Return Impact — Find the return rate in each product category along with the total and average refund value. Your result table should have: category, return_rate, avg_refund_amount, total_refund_amount. 2. Product Demand by Store — In each store, which products are more in demand based on quantity sold? Find the contribution of each product to qty sold within its store. Your result table should have: store_name, product_name, total_qty, contribution. 3. Product Returns by Store — In each store, which products are returned more? Solve in the same way as Question 2. Your result table should have: store_name, product_name, total_qty, contribution. 4. Insight Question — Is there any product in a store that has both high demand and high return? Answer in 3 lines — no query needed.
Your output should look like this (partial example):
| category | return_rate | avg_refund_amount | total_refund_amount |
|---|---|---|---|
| Electronics | 8.33 | 1200.00 | 3600.00 |
| Fashion | 6.25 | 750.00 | 2250.00 |
| … | … | … | … |