GROUP BY keeps NULL category values together as their own bucket.
highlighted = computed this step
Input table
Start with sales rows where two category cells are NULL.
Sales with NULL category
Group query
Group by category and count every row in each key bucket.
GROUP BY category with NULL
Grouped output
Rows with NULL category form one NULL bucket.
NULL category bucket