Row aggregates and compute

The row aggregates used with compute are listed in Table 3-2:

Table 3-2: How aggregates are used with a compute statement

Row aggregates

Result

sum

Total of the values in the expression

avg

Average of the values in the expression

max

Highest value in the expression

min

Lowest value in the expression

count

Number of selected rows as an integer

count_big

Number of selected rows as a bigint

These row aggregates are the same aggregates that can be used with group by, except there is no row aggregate function that is the equivalent of count(*). To find the summary information produced by group by and count(*), use a compute clause without the by keyword.