SUM Aggregate
Predict Output Easy
Question
What does this SQL produce?
Code
-- orders: amounts 100, 200, 300
SELECT SUM(amount) FROM orders;
Hint
SUM adds all values in the column.
Explanation
SUM(amount) adds all values in the amount column: 100 + 200 + 300 = 600. NULL values are ignored.
Related Resources
Related Lessons
- Aggregations
Learn aggregations.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.