Multiple choice technology databases

Which clause specifies conditions that determines the groups included in the query?

  1. Having Clause

  2. Where clause

  3. Distinct

  4. Exists

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

HAVING clause filters groups after aggregation, while WHERE clause filters individual rows before grouping. HAVING is used to specify conditions on the groups created by GROUP BY, such as showing only categories with total sales above a threshold. WHERE cannot be used with aggregate functions, whereas HAVING can.