Examine the data in the ORD_ITEMS table:
Which statement is true regarding the outcome of the above query?
A.
It gives an error because the having clause should be specified after the group by clause.
B.
It gives an error because all the aggregate functions used in the having clause must be
specified in the select list.
C.
It displays the item nos with their average quantity where the average quantity is more than
double the minimum quantity of that item in the table.
D.
It displays the item nos with their average quantity where the average quantity is more than
double the overall minimum quantity of all the items in the table.
Explanation:
Traditionally, HAVING clause should come after GROUP BY clause, however, the above one works. C is the correct answer. GROUP BY analyse each item instead of all items.
A. It gives an error because the having clause should be specified after the group by clause.