Your question is SQL Average Sales Per Customer. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Aimpoint Digital analysts need a customer-level sales summary for a client reporting workflow. Write a PostgreSQL query that calculates the average sale amount for every identified customer.
customer_id and calculate the average non-null sale_amount.| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique sales transaction identifier |
| customer_id | INT | Customer identifier associated with the sale |
| sale_amount | DECIMAL(10,2) | Monetary value of the sale |
| sale_date | DATE | Date on which the sale occurred |