HAVING

HAVING

HAVING is a modifier that filters groups that do not meet a specified condition. It is always used in combination with GROUP BY.

For example, we can edit the query which shows the number of award nominations per film, so it shows only films that have had more than 5 nominations.

Note that the HAVING modifier must come directly after GROUP BY.

Skip to content