Skip to content
RED SAGSkills
easy5 pts · first answer countssqlaggregation

WHERE vs HAVING

You want to list only those cities whose total sales are above 1,00,000. Which clause should filter on the total?

SELECT city, SUM(amount) AS total
FROM orders
GROUP BY city
-- filter here?
Choose one answer