P54SQLBeginnerChoose4 min
Choose WHERE or HAVING for a Low-Volume Customer Filter
Choose the filtering stage for a rule based on aggregated order counts.
#choose#having#group-by
Scenario
The team needs customers with fewer than three completed orders. Each order is one row and status is stored per order.
Problem statement
Choose WHERE or HAVING and write the query shape.
Your Task
- Filter completed orders correctly.
- Filter customer aggregates correctly.
- Explain the two stages.
Related Concepts
WHEREHAVINGGROUP BY
Ready to count this problem?
Mark it complete when you have reasoned through the solution in your own words.