What is the difference between GROUP BY and ORDER BY?
Use the provided customer and order data to demonstrate the distinction with one aggregate result. Include customers without orders and sort the final result by total order value.
customer_name, total_orders, and total_amount.total_amount descending, then customer_name 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 |
| amount | DECIMAL(10,2) | Order amount |
| status | VARCHAR(20) | Order processing status |