AMU 2026 — Computer PYQ
AMU | Computer | 2026Which of the following are valid aggregate functions in SQL?
I. AVG ( )
II. MAX ( )
III. ALL ( )
IV. COUNT ( )
Choose the correct answer:
- A.
I, II and III
- B.
II, III and IV
- C.
I, II and IV
(Correct Answer) - D.
All
I, II and IV
Explanation
Aggregate functions in SQL perform a calculation on a set of values and return a single scalar value. Standard SQL supports five primary built-in aggregate functions:
AVG(): Calculates the arithmetic mean of a set of numeric values.AVG(X)=n1i=1∑nXi
MAX(): Identifies and returns the maximum value in a set.MIN(): Identifies and returns the minimum value in a set.SUM(): Computes the absolute mathematical sum of a numeric set.COUNT(): Returns the total number of rows or non-null values matching the query criteria.
Why Statement III is Incorrect:
ALLis a logical operator/keyword used in SQL conditional clauses (typically inside aWHEREorHAVINGclause paired with comparison operators like>,<,=) to compare a scalar value against every single value returned by a subquery. It is not an aggregate function and cannot be used to condense multiple rows into a single summary scalar output.
Therefore, statements I, II, and IV are valid aggregate functions, making option (c) the correct choice.
