Preguntas tecnicas de sql, powerbi, Python
This item focuses on the SQL portion. Using customers and orders, write a query that summarizes completed orders for every customer.
customer_id, customer_name, completed_order_count, completed_revenue, and spending_band.High for at least 1000, Medium for 500 to 999.99, and Low below 500.completed_revenue descending, then customer_id ascending.| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer display name |
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| customer_id | INT | Customer associated with the order |
| status | VARCHAR(20) | Order lifecycle status |
| amount | NUMERIC(10,2) | Order amount |