Your question is Average Sales Per Month. 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.
Closer Consulting wants a monthly view of sales performance. Write a PostgreSQL query that calculates the average non-null sale amount for each calendar month in the sales table.
AVG should ignore rows where sale_amount is NULL.
| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique identifier for the sale |
| sale_date | DATE | Date on which the sale occurred |
| sale_amount | DECIMAL(10,2) | Monetary value of the sale |