Aggregating Data with Group Functions Flashcards
6 cards from real 1Z0-071 practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 6 Aggregating Data with Group Functions flashcards as text
Which GROUP BY function returns the total sum of a numeric column?
Answer: SUM()
SUM() adds up all non-NULL numeric values in the specified column.
What happens to NULL values when using the AVG() function in Oracle SQL?
Answer: They are ignored entirely
Oracle's AVG() function ignores NULL values and calculates the average of only non-NULL rows.
Which clause is used to filter the results of a GROUP BY query?
Answer: HAVING
The HAVING clause filters groups after aggregation, unlike WHERE which filters rows before grouping.
What does the COUNT(*) function return?
Answer: Total number of rows including NULLs
COUNT(*) counts every row in the result set regardless of NULL values in any column.
Which statement about the GROUP BY clause is TRUE?
Answer: Columns in SELECT not in an aggregate must appear in GROUP BY
Any non-aggregated column in the SELECT list must also appear in the GROUP BY clause.
Which function returns the highest value in a set of values?
Answer: MAX()
MAX() is a group function that returns the maximum value across all rows in the group.