Multiple choice technology databases

You must also use the GROUP BY clause whenever using the HAVING clause.

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

HAVING can be used without GROUP BY when filtering on aggregate totals of the entire result set. For example, 'SELECT COUNT() FROM table HAVING COUNT() > 10' is valid SQL - it applies HAVING to the single aggregate row. GROUP BY is only required when HAVING is used to filter groups within partitions.