83
HAVING Clause
SELECT
product, Sum(price * quantity)
FROM
Purchase
WHERE
date > “9/1”
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.