MIN(amount) keeps the smallest non-NULL amount value inside each category group.
highlighted = computed this step
Input table
Use the same sales rows with one NULL amount.
Group query
Group by category and take the smallest non-NULL amount.
GROUP BY category, MIN(amount)
Grouped output
The NULL amount is skipped, so the pen minimum is the smallest known amount.
minimum amounts by category