HAVING can filter on an aggregate alias such as SUM(amount).
highlighted = computed this step
Input table
Use grouped sales rows with one NULL amount.
Group query
Group by category, sum non-NULL amounts, then apply HAVING to the sum.
GROUP BY category HAVING SUM(amount)
Grouped output
Only the group whose total is above the threshold remains.
sum-filtered groups