Write a SQL query to calculate the average value of a column grouped by category.
Use the category_values table. Include a NULL category as its own group, ignore NULL values when calculating averages, and sort categories alphabetically with the NULL category last.
category and average_value.category ascending, with NULL last.| Column | Type | Description |
|---|---|---|
| value_idPK | INT | Unique identifier for the value record |
| category | VARCHAR(50) | Category assigned to the value |
| value | NUMERIC(10,2) | Numeric value to average |