SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
A-6
AGGREGATE Functions
ADD DEFINE =ODETAIL_TABLE, FILE $VOL3.SALES.ODETAIL ;
ADD DEFINE =PARTS_TABLE, FILE $VOL4.SALES.PARTS ;
AGGREGATE Functions
NonStop SQL/MP provides these aggregate functions:
For more information, see the entry for a specific function.
Alias
An alias is a name assigned to a column in the select list of the SELECT command
using the SQLCI report writer NAME command. You can use an alias to refer to the
column in other parts of a report definition, such as a DETAIL command.
Use aliases to define abbreviations for long column names and to assign informative
names to columns that consist of expressions.
An alias is not the same as a detail alias, which is a name assigned to a print item
using the NAME clause of the DETAIL command. You can use a detail alias in report
formatting commands such as TOTAL and SUBTOTAL but not in the DETAIL
command itself.
AVG Function Computes the average of a set of numbers.
COUNT Function Counts the number of rows that result from a query or the
number of rows that contain a distinct value in a specific
column.
MAX Function
Determines a maximum value.
MIN Function
Determines a minimum value.
SUM Function Computes the sum of a set of numbers.