Amazon Kuiper Commercial Services needs a sales summary for a reporting period. Write a PostgreSQL query that calculates the total sales value by item category and location from 2025-01-01 through 2025-01-31, inclusive.
quantity * unit_price by category and location, treating a NULL quantity as zero.| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique sale identifier |
| item_id | INT | Sold item identifier |
| sale_date | DATE | Date on which the sale occurred |
| location | VARCHAR(100) | Commercial service location |
| quantity | INT | Number of units sold |
| Column | Type | Description |
|---|---|---|
| item_idPK | INT | Unique item identifier |
| category_name | VARCHAR(100) | Item category name |
| Column | Type | Description |
|---|---|---|
| item_id | INT | Item associated with the price |
| effective_from | DATE | Inclusive price start date |
| effective_to | DATE | Exclusive price end date, NULL indicates an active price |
| unit_price | NUMERIC(10,2) | Price per unit |