Bird
0
0

Which of the following is the correct syntax to find the average of the column score in table TestResults?

easy📝 Syntax Q3 of 15
SQL - Aggregate Functions
Which of the following is the correct syntax to find the average of the column score in table TestResults?
ASELECT MEAN(score) FROM TestResults;
BSELECT AVG(score) FROM TestResults;
CSELECT score.AVG() FROM TestResults;
DSELECT AVERAGE(score) FROM TestResults;
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct AVG() usage

    AVG() is used as SELECT AVG(column) FROM table; to get average values.
  2. Step 2: Identify invalid syntax

    AVERAGE(), MEAN(), and method call syntax like score.AVG() are not valid SQL syntax.
  3. Final Answer:

    SELECT AVG(score) FROM TestResults; -> Option B
  4. Quick Check:

    Correct AVG() syntax = SELECT AVG(score) FROM TestResults; [OK]
Quick Trick: AVG() is a function, use SELECT AVG(column) FROM table [OK]
Common Mistakes:
MISTAKES
  • Using non-standard function names
  • Trying method call syntax on columns

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes