Question:

Which of the following is NOT a valid aggregate function in SQL?

Show Hint

Aggregate functions usually ignore NULL values, except for COUNT(), which counts every row regardless of content.
Updated On: May 30, 2026
  • AVG()
  • SUM()
  • COUNT()
  • COMPUTE()
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation


Step 1: Understanding the Concept:

Aggregate functions in SQL perform a calculation on a set of values and return a single value. They are often used with the GROUP BY clause.

Step 2: Detailed Explanation:

Standard SQL aggregate functions include:
AVG(): Calculates the average value.
SUM(): Adds up all the values.
COUNT(): Counts the number of rows.
MAX() MIN(): Finds the highest and lowest values. COMPUTE() is not a standard aggregate function in modern SQL. While some legacy systems had a COMPUTE clause for generating summary rows, it is not a standard function used in SELECT statements like the others.

Step 3: Final Answer:

COMPUTE() is not a valid aggregate function.
Was this answer helpful?
0
0