2. Agenda
COUNT(), SUM(), MIN(), MAX(), AVG()
Accounting for NULLs
Grouping on multiple fields
Ordering Results
HAVING – Filtering on Aggregate fields
Filtering on Aggregate and non-aggregate fields
DISTINCT
3. COUNT(), SUM(), MIN(), MAX(), AVG()
function(expression) – Expressions generally column name
COUNT(x) – number of matching records, can be *, 1,
column
SUM(x) – summation of expression or column per group
MIN(x) – minimum of expression value per group
MAX(x) – maximum of expression value per group
AVG(x) – average of expression value per group