Bird
0
0

What does the SQL SUM() function do?

easy📝 Conceptual Q11 of 15
SQL - Aggregate Functions
What does the SQL SUM() function do?
AAdds all numbers in a numeric column to get a total
BCounts the number of rows in a table
CFinds the highest value in a column
DDeletes duplicate rows from a table
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of SUM()

    The SUM() function is designed to add up all values in a numeric column.
  2. Step 2: Compare with other functions

    Counting rows is done by COUNT(), highest value by MAX(), and deleting duplicates is unrelated.
  3. Final Answer:

    Adds all numbers in a numeric column to get a total -> Option A
  4. Quick Check:

    SUM() = total of numbers [OK]
Quick Trick: SUM() always adds numbers in a column [OK]
Common Mistakes:
MISTAKES
  • Confusing SUM() with COUNT()
  • Thinking SUM() works on text columns
  • Assuming SUM() deletes or filters rows

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes