Which of the following lists the five built-in aggregate functions provided by standard SQL?

Difficulty: Easy

Correct Answer: COUNT, SUM, AVG, MAX, MIN

Explanation:


Introduction / Context:
Aggregate functions compute values across sets of rows. SQL defines several standard aggregates for summarization and analytics.



Given Data / Assumptions:

  • We are looking for the five standard aggregates recognized by SQL.
  • Vendor extensions may exist, but only the five core ones are standardized.


Concept / Approach:
COUNT counts rows, SUM adds numeric values, AVG computes mean, MIN finds minimum, and MAX finds maximum. Functions like MULT, DIV, and NAME do not exist as SQL aggregates.



Step-by-Step Solution:

List all standardized aggregates.Compare with options.Select COUNT, SUM, AVG, MAX, MIN as correct.


Verification / Alternative check:
ANSI SQL and vendor documentation confirm these five core aggregates.



Why Other Options Are Wrong:
They include non-existent functions like MULT, DIV, NAME.



Common Pitfalls:
Confusing aggregate functions with scalar functions (e.g., LENGTH, UPPER).



Final Answer:
COUNT, SUM, AVG, MAX, MIN

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion