Calculating Aggregates - Aggregate Functions Cheatsheet - Codecademy
Calculating Aggregates - Aggregate Functions Cheatsheet - Codecademy
Aggregate Functions
Column References
HAVING Clause
The HAVING clause is used to further filter the result SELECT year,
set groups provided by the GROUP BY clause.
COUNT(*)
HAVING is often used with aggregate functions to
FROM movies
filter the result set groups based on an aggregate
property. The given query will select only the records GROUP BY year
(rows) from only years where more than 5 movies were HAVING COUNT(*) > 5;
released per year.
The HAVING clause must always come after a
GROUP BY clause but must come before any
ORDER BY or LIMIT clause.
Aggregate Functions
ROUND() Function
Print Share