HAVING Clause
SELECT product, Sum(price * quantity)
FROM Purchase
GROUP BY product
HAVING Sum(quantity) > 30
Same query, except that we consider only products that had
at least 100 buyers.
HAVING clause contains conditions on aggregates.
Previous slide
Next slide
Back to first slide
View graphic version