Your question is SQL 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.
Aviso AI wants a monthly view of sales performance for a selected reporting period. Write a PostgreSQL query using the sales table to calculate the average non-null sale amount for each month from January through March 2025.
YYYY-MM.sale_amount, rounded to two decimal places, and sort the results chronologically.2025-01-01 through 2025-03-31.| Column | Type | Description |
|---|---|---|
| sale_idPK | INTEGER | Unique sale identifier |
| sale_date | DATE | Date the sale was recorded |
| sale_amount | NUMERIC(10,2) | Sale amount, which may be NULL |
| sales_channel | VARCHAR(30) | Channel through which the sale occurred |