Bird
0
0

Identify the error in the following SQL query: SELECT MIN Salary FROM Sales;

medium📝 Debug Q6 of 15
SQL - Aggregate Functions
Identify the error in the following SQL query: SELECT MIN Salary FROM Sales;
AMissing parentheses around Salary
BMIN cannot be used on numeric columns
CTable name Sales is incorrect
DMIN should be lowercase
Step-by-Step Solution
Solution:
  1. Step 1: Check function syntax

    Aggregate functions like MIN require parentheses around the column name.
  2. Step 2: Identify the missing parentheses

    The query misses parentheses around Salary, causing syntax error.
  3. Final Answer:

    Missing parentheses around Salary -> Option A
  4. Quick Check:

    MIN() needs parentheses [OK]
Quick Trick: Always use parentheses with MIN() and MAX() [OK]
Common Mistakes:
MISTAKES
  • Omitting parentheses
  • Wrong table name assumption
  • Case sensitivity confusion

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes