DATA-MANAGEMENT-FOUNDATIONS practice question 15 of 15
What does the aggregate function do?
Full set: 60 questionsDomain Data Querying
An aggregate function performs a calculation on a set of rows and returns a single, summary value. Common examples in SQL include COUNT(), SUM(), AVG(), MIN(), and MAX(). These functions are used to condense information from multiple rows into a single result, often in conjunction with the GROUP BY clause to create summary reports for different categories within the data. For instance, SUM(sales) would compute the total sales value across all rows in the specified group.
B. This describes a set difference operation, such as EXCEPT or MINUS, which is used to find distinct rows in one query result that are not present in another.
C. This describes projection, the process of selecting specific columns to be returned in a result set, which is the fundamental purpose of the SELECT clause itself.
D. This describes a JOIN operation (specifically a CROSS JOIN if no condition is specified), which is used to combine rows from two or more tables.
1. PostgreSQL 16 Documentation, Chapter 9: Functions and Operators, Section 9.21: Aggregate Functions. The documentation states, "Aggregate functions compute a single result from a set of input values." This directly supports the definition that they operate over a set of rows.
2. Oracle Database SQL Language Reference, 23c, Chapter 7: SQL Functions, "Aggregate Functions". The official documentation explains, "Aggregate functions return a single result row based on groups of rows, rather than on single rows." This confirms that their purpose is to compute a value over a set of rows.
3. Silberschatz, A., Korth, H. F., & Sudarshan, S. (2020). Database System Concepts (7th ed.). McGraw-Hill. Chapter 4, "Intermediate SQL", Section 4.1 "Aggregate Functions", p. 135. The text introduces aggregate functions by stating they "take a collection (a set or multiset) of values as input and return a single value."
Keep practicing
Take the free DATA-MANAGEMENT-FOUNDATIONS practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DATA-MANAGEMENT-FOUNDATIONS practice questions
- Question 1Which clause is used to specify the join columns when performing a join in MySQL?
- Question 2What is the first step of the analysis phase for designing a database?
- Question 3Which expression can be used to create a temporary name for a table?
- Question 4Which object relates an entity to itself in an entity-relationship model?
- Question 5Which action does the % operator accomplish in MySQL?
- Question 6Which description defines a data type?
