Question:medium

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

The Correct Option is D

Solution and Explanation

Step 1: Understanding the Concept:
Aggregate functions perform a calculation on a set of values and return a single value. They are fundamental for data analysis in SQL.
Step 2: Detailed Explanation:
Standard SQL aggregate functions include:
1. AVG(): Returns the average value of a numeric column.
2. SUM(): Returns the total sum of a numeric column.
3. COUNT(): Returns the number of rows.
4. MAX()/MIN(): Returns the largest/smallest value.
COMPUTE() is not a standard aggregate function in the ANSI SQL standard. It was a proprietary keyword in older versions of T-SQL (SQL Server) used for generating summary totals at the end of a result set, but it has since been deprecated and is not considered a standard aggregate function.
Step 3: Final Answer:
COMPUTE() is not a valid standard aggregate function.
Was this answer helpful?
0


Questions Asked in CUET (UG) exam