SQL - Aggregate FunctionsWhat does the SQL SUM() function do?AAdds all numbers in a numeric column to get a totalBCounts the number of rows in a tableCFinds the highest value in a columnDDeletes duplicate rows from a tableCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand the purpose of SUM()The SUM() function is designed to add up all values in a numeric column.Step 2: Compare with other functionsCounting rows is done by COUNT(), highest value by MAX(), and deleting duplicates is unrelated.Final Answer:Adds all numbers in a numeric column to get a total -> Option AQuick Check:SUM() = total of numbers [OK]Quick Trick: SUM() always adds numbers in a column [OK]Common Mistakes:MISTAKESConfusing SUM() with COUNT()Thinking SUM() works on text columnsAssuming SUM() deletes or filters rows
Master "Aggregate Functions" in SQL9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More SQL Quizzes Advanced Joins - FULL OUTER JOIN behavior - Quiz 3easy GROUP BY and HAVING - GROUP BY with NULL values behavior - Quiz 10hard GROUP BY and HAVING - WHERE vs HAVING mental model - Quiz 13medium LEFT and RIGHT JOIN - LEFT JOIN execution behavior - Quiz 11easy LEFT and RIGHT JOIN - Why outer joins are needed - Quiz 6medium Set Operations - Set operation column matching rules - Quiz 7medium Subqueries - Subquery with EXISTS operator - Quiz 8hard Subqueries - Subquery in WHERE clause - Quiz 1easy Table Constraints - Composite primary keys - Quiz 15hard Views - Why views are needed - Quiz 6medium