Multiple choice

Which of the following is/are the difference(s) between having and where clause? (a) Where is used to filter rows while having is used to filter groups. (b) There is no alternative for 'where'. To filter groups, we have operators other than 'having'. (c) Aggregate cannot be used in where clause. Aggregate can be used in having clause.

  1. Only a

  2. Both a and b

  3. All a, b and c

  4. Both b and c

  5. None of these

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

Aggregate can be used in having clause, e.g. select name from student where branch='cse' group by year having avg(marks)>50.