SQL Challenge
Product catalog.
| Name | Type | Notes |
|---|---|---|
| product_id | INT | Primary key |
| product_name | VARCHAR | Product name |
| category | VARCHAR | Category |
| product_id | product_name | category |
|---|---|---|
| 1 | Laptop | Electronics |
| 2 | Phone | Electronics |
| 3 | Desk | Furniture |
| 4 | Chair | Furniture |
| 5 | Pen | Stationery |
Sales transactions.
| Name | Type | Notes |
|---|---|---|
| sale_id | INT | Primary key |
| product_id | INT | Foreign key |
| quantity | INT | Quantity sold |
| price | DECIMAL | Unit price |
| sale_id | product_id | quantity | price |
|---|---|---|---|
| 1 | 1 | 2 | 999.99 |
| 2 | 2 | 5 | 699.99 |
| 3 | 3 | 3 | 299 |
| 4 | 4 | 4 | 150 |
| 5 | 5 | 20 | 2.5 |
Result Preview
Awaiting RunRun your query to see the dataset preview.