84
General form of Grouping and Aggregation
•SELECT    S
•FROM       R1,…,Rn
•WHERE    C1
•GROUP BY a1,…,ak
•HAVING     C2
•
•S = may contain attributes a1,…,ak and/or any aggregates but NO OTHER ATTRIBUTES
•C1 = is any condition on the attributes in R1,…,Rn
•C2 = is any condition on aggregate expressions
Why ?