Describe a time you had to use SQL to optimize a complex query.
For a hands-on SQL follow-up, write a query using the provided tables to return customers with at least two completed orders during 2025.
customer_id, customer_name, completed_order_count, total_revenue, latest_completed_order_date, and customer_segmenttotal_revenue descending, then customer_id ascending| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer display name |
| region | VARCHAR(50) | Customer region |
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| customer_id | INT | Customer who placed the order |
| order_date | DATE | Order placement date |
| status | VARCHAR(20) | Order processing status |
| Column | Type | Description |
|---|---|---|
| order_item_idPK | INT | Unique order-line identifier |
| order_id | INT | Order containing the line item |
| quantity | INT | Quantity purchased |
| unit_price | DECIMAL(10,2) | Price per unit |