Learn SQL_ Aggregate Functions Cheatsheet _ Codecademy
Learn SQL_ 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 filter
the result set groups based on an aggregate property. The FROM movies
given query will select only the records (rows) from only GROUP BY year
years where more than 5 movies were released per year.
HAVING COUNT(*) > 5;
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