Skip to main contentSkip to solution

Which of the following are aggregate functions in SQL?

A. Count

B. Avg

C. Max

D. Mid

Solution

✅ Correct Option: 1

COUNT(), AVG() and MAX() are standard SQL aggregate functions. Each works on a set of rows and returns a single value: COUNT() gives the number of rows, AVG() the average of a column, and MAX() the largest value.


Option 2, 3 and 4: MID() is a string function that extracts part of a text, not an aggregate function. In standard SQL the equivalent is SUBSTRING().

Other standard aggregate functions are SUM() and MIN(). Do not confuse MID with MIN.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question