COALESCE can label missing group keys before GROUP BY makes buckets.
Input table
Start with the same sales rows where two category cells are NULL.
Sales with NULL category
Label missing categories
COALESCE turns NULL category into Uncategorized before grouping.
COALESCE category label
Group query
Group by the labeled category and count every row.
GROUP BY category label
Grouped output
The missing category rows now appear under the Uncategorized label.
labeled category buckets