CBSE Class 12 Computer Science Question 38 of 91

Grouping Records, Joins in SQL — Question 16

Back to all questions
16
Question

Question 16

The sum(), if used in a condition, is used with ............... clause.

  1. Group by
  2. With
  3. Where
  4. Having
Answer

Having

Reason — When using the SUM() function in a condition, it is used with the HAVING clause. The HAVING clause is used to apply conditions to groups of rows after the GROUP BY operation has been performed, making it suitable for conditions involving aggregate functions like SUM().