Bird
0
0

What is wrong with this query to find the maximum age from the Users table?

medium📝 Debug Q14 of 15
SQL - Aggregate Functions
What is wrong with this query to find the maximum age from the Users table?
SELECT MAX age FROM Users;
AMissing parentheses around the column name
BMAX function cannot be used on numeric columns
CTable name should be in quotes
DMAX should be lowercase
Step-by-Step Solution
Solution:
  1. Step 1: Check function syntax

    The MAX() function requires parentheses around the column name, so MAX age is invalid syntax.
  2. Step 2: Verify other options

    MAX works on numeric columns, table names don't need quotes, and function names are case-insensitive in SQL.
  3. Final Answer:

    Missing parentheses around the column name -> Option A
  4. Quick Check:

    MAX() needs parentheses [OK]
Quick Trick: Always use parentheses with MAX() [OK]
Common Mistakes:
MISTAKES
  • Omitting parentheses in function calls
  • Thinking MAX() only works on strings
  • Adding unnecessary quotes around table names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes