Skip to main content
HAVING filters the groups by their totals. WHERE looks at single rows before they’re grouped; HAVING looks at each group’s totals afterwards.
This keeps the vendors with more than 1,000 in net sales. HAVING takes the same operators, AND and OR as WHERE:
The metrics in HAVING need to be in SHOW.