Which SQL clause filters aggregated results (HAVING)?
Asked in the Online test stage. Using the provided customers and orders tables, calculate each customer's completed order count and total amount, returning only customers whose completed order total is at least 500.
customer_name, completed_order_count, and completed_total.completed_total descending, then customer_name ascending.| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer display name |
| VARCHAR(150) | Customer email address |
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| customer_id | INT | Referenced customer identifier |
| amount | DECIMAL(10,2) | Order amount |
| status | VARCHAR(20) | Order processing status |