A data analyst queries a table of daily transactions for multiple product lines. The manager wants a figure that combines daily revenue amounts by product line. Which aggregator function should the analyst use to produce that figure?
Adding the revenue amounts for each product line is done with a function that sums numeric values. SUM() adds the daily amounts into a single value. AGGREGATE() is not a function in SQL. COUNT() returns how many rows are in the result set. AVG() computes an average of the daily values. To get a combined number that includes revenue amounts, SUM() is best.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the SUM() function used for in SQL?
Open an interactive chat with Bash
Can you explain what AGGREGATE() does?
Open an interactive chat with Bash
How does the COUNT() function differ from the SUM() function?