Which aggregate function returns the total of a numeric column?

Prepare for the IGCSE Algorithms and Pseudocode Exam. Study with comprehensive questions covering key algorithms and pseudocode techniques. Access hints and explanations to gear up for your exam success!

Multiple Choice

Which aggregate function returns the total of a numeric column?

Explanation:
To get the total of a numeric column, you use the SUM aggregate function. It adds up all the numeric values in the column to produce a single total for the set of rows you’re examining (or for each group if you use GROUP BY). NULL values are typically ignored in the sum, so they don’t affect the total. By contrast, MIN and MAX return the smallest and largest values, not their sum, and COUNT tallies how many rows (or non-null values in a column) there are, not the total of the values themselves. So the function that yields the total is SUM.

To get the total of a numeric column, you use the SUM aggregate function. It adds up all the numeric values in the column to produce a single total for the set of rows you’re examining (or for each group if you use GROUP BY). NULL values are typically ignored in the sum, so they don’t affect the total. By contrast, MIN and MAX return the smallest and largest values, not their sum, and COUNT tallies how many rows (or non-null values in a column) there are, not the total of the values themselves. So the function that yields the total is SUM.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy