HAVING Clause
SELECT product, Sum(price)
FROM Product, Purchase
WHERE Product.name = Purchase.product
GROUP BY Product.name
HAVING Count(buyer) > 100
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