Bird
0
0

What is the primary purpose of the SQL AVG() function?

easy📝 Conceptual Q1 of 15
SQL - Aggregate Functions
What is the primary purpose of the SQL AVG() function?
ATo calculate the mean value of a numeric column
BTo count the number of rows in a table
CTo find the maximum value in a column
DTo sum all values in a column
Step-by-Step Solution
Solution:
  1. Step 1: Understand AVG()

    The AVG() function computes the average (mean) of numeric values in a column.
  2. Step 2: Differentiate from other aggregate functions

    COUNT counts rows, MAX finds the highest value, SUM adds values.
  3. Final Answer:

    To calculate the mean value of a numeric column -> Option A
  4. Quick Check:

    AVG calculates average [OK]
Quick Trick: AVG() returns mean of numeric values [OK]
Common Mistakes:
MISTAKES
  • Confusing AVG() with COUNT()
  • Thinking AVG() sums values
  • Assuming AVG() returns max value

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes