The Zappos Family wants to compare average purchase sizes across customers using order transaction data. Write a PostgreSQL query that calculates the average order value for each customer.
customer_id.order_total, rounded to two decimal places.NULL last.PostgreSQL's AVG ignores NULL order totals. If a customer has no non-NULL order totals, their average should remain NULL.
| Column | Type | Description |
|---|---|---|
| order_idPK | INTEGER | Unique order identifier |
| customer_id | INTEGER | Identifier of the customer who placed the order |
| order_total | NUMERIC(10,2) | Total monetary value of the order |
| order_date | DATE | Date the order was placed |