What are some common mid-level SQL questions you can answer?
For this exercise, write one PostgreSQL query that summarizes qualifying customer orders during the first quarter of 2025. Include only customers with at least two completed orders in that period.
customer_id, customer_name, completed_order_count, total_amount, average_order_amount, and spending_tier.spending_tier must be High for totals of at least 500, Medium for totals from 250 through 499.99, and Low otherwise.total_amount descending, then customer_id ascending.| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer display name |
| region | VARCHAR(30) | Customer region |
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| customer_id | INT | Customer who placed the order |
| order_date | DATE | Date the order was placed |
| order_status | VARCHAR(20) | Order state |
| amount | NUMERIC(10,2) | Order amount |