Apama 10.3 | Apama Documentation | Developing Apama Applications | EPL Reference | Aggregate Functions | Built-in aggregate functions
Built-in aggregate functions
EPL provides built-in aggregate functions in the com.apama.aggregates package. All of these functions are available for either bounded or unbounded use. See the com.apama.aggregates package in the API Reference for EPL (ApamaDoc) for detailed information on each built-in aggregate function.
To use a built-in aggregate function in a query, you must do one of the following:
*Specify the full name of the aggregate function. For example:
select com.apama.aggregates.sum(x)
*For each aggregate function you want to use in your code, add a using statement. This lets you specify aggregate function names without specifying the package name. For example:
using com.apama.aggregates.mean;
using com.apama.aggregates.stddev;
...select MeanSD( mean(s), stddev(s) );
Insert the using statement after the optional package declaration and before any other declarations in the .mon file.
See also:
*Select clause for information about the select clause in Apama queries.
*Working with Streams and Stream Queries
*Aggregating items in projections

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.