Skip to content
RED SAG Skills
easyStudy question · answer published in SQL interview questions, so no pointssqlaggregation

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

Discussion 0

Join free to post in the discussion.

Related questions