Aggregate Functions are functions that operate on a set of rows to calculate and return a single value.
It is often necessary to summarize data without actually retrieving it all, and SQL provides special functions for this purpose.
Examples of this type of retrieval are:
Determining the number of rows in a table.
Obtaining the sum of a set of rows in a table.
Finding the highest, lowest, and average values in a table column.
Following is the list of frequently using Aggregate Functions:
Function | Description |
---|---|
AVG() | Returns a column's average value |
COUNT() | Returns the number of rows in a column |
MIN() | Returns a column's highest value |
MAX() | Returns a column's lowest value |
SUM() | Returns the sum of a column's values |
If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!