Grouping and Aggregation: Summary
SELECT product, Sum(price)
WHERE Product.name = Purchase.product
1. Compute the relation (I.e., the FROM and WHERE).
2. Group by the attributes in the GROUP BY
3. Select one tuple for every group (and apply aggregation)
SELECT can have (1) grouped attributes or (2) aggregates.