Bird
0
0

Identify the error in this query: SELECT AVG FROM Orders;

medium📝 Debug Q6 of 15
SQL - Aggregate Functions
Identify the error in this query: SELECT AVG FROM Orders;
AAVG cannot be used without GROUP BY
BAVG is not a valid function
CMissing parentheses after AVG
DTable name is incorrect
Step-by-Step Solution
Solution:
  1. Step 1: Check AVG() function syntax

    AVG() requires parentheses with a column name inside, e.g., AVG(column).
  2. Step 2: Identify missing parentheses

    The query uses AVG without parentheses, causing syntax error.
  3. Final Answer:

    Missing parentheses after AVG -> Option C
  4. Quick Check:

    AVG() needs parentheses [OK]
Quick Trick: Always use AVG(column) with parentheses [OK]
Common Mistakes:
MISTAKES
  • Omitting parentheses after AVG
  • Using AVG without column name

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes