Bird
0
0

What does the SQL AVG() function do?

easy📝 Conceptual Q11 of 15
SQL - Aggregate Functions
What does the SQL AVG() function do?
ACalculates the average value of a numeric column
BCounts the number of rows in a table
CFinds the maximum value in a column
DReturns the sum of all values in a column
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of AVG()

    The AVG() function is designed to calculate the average (mean) of numeric values in a column.
  2. Step 2: Compare with other aggregate functions

    Unlike COUNT(), MAX(), or SUM(), AVG() specifically returns the average value.
  3. Final Answer:

    Calculates the average value of a numeric column -> Option A
  4. Quick Check:

    AVG() = average calculation [OK]
Quick Trick: AVG() always returns the mean of numbers, not counts or sums [OK]
Common Mistakes:
MISTAKES
  • Confusing AVG() with COUNT()
  • Thinking AVG() sums values without dividing
  • Assuming AVG() works on non-numeric columns

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes