SQL Statements for Flat-File Drivers : Select Statement : Select Clause : Aggregate Functions

Aggregate Functions
Aggregate functions can also be a part of a Select clause. Aggregate functions return a single value from a set of rows. An aggregate can be used with a field name (for example, AVG(SALARY)) or in combination with a more complex column expression (for example, AVG(SALARY * 1.07)). The column expression can be preceded by the Distinct operator. The Distinct operator eliminates duplicate values from an aggregate expression. For example:
COUNT (DISTINCT last_name)
In this example, only distinct last name values are counted.
The following table lists valid aggregate functions.

© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.