SQL Challenge
Customer information.
| Name | Type | Notes |
|---|---|---|
| customer_id | INT | Primary key |
| customer_name | VARCHAR | Customer name |
| customer_id | customer_name |
|---|---|
| 1 | Alice |
| 2 | Bob |
| 3 | Charlie |
| 4 | Diana |
Order transactions.
| Name | Type | Notes |
|---|---|---|
| order_id | INT | Primary key |
| customer_id | INT | Foreign key |
| order_amount | DECIMAL | Order total |
| order_id | customer_id | order_amount |
|---|---|---|
| 1 | 1 | 100 |
| 2 | 1 | 150 |
| 3 | 1 | 200 |
| 4 | 2 | 75 |
| 5 | 3 | 120 |
| 6 | 3 | 90 |
| 7 | 3 | 110 |
Result Preview
Awaiting RunRun your query to see the dataset preview.