Calling an aggregate function

An aggregate function can be used almost anywhere where SQL allows an aggregate function.

An aggregate function returns a single value per group or window. Grand aggregates return a single result for all the data. The following is an example of using an aggregate function:
SELECT color, applyAggSum(f1, f2, f3, f4) FROM edutestdata GROUP BY color.
RESULT
COLOR | APPLYAGGSUM
--------+
blue | -------------413
green | 413
red | 413
yellow | 413