Supported Aggregation Functions
This section lists the aggregation functions that are only supported in aggregation operator expressions.
NOTE:
Panopticon Streams also supports nullability where:
- A field may or may not allow null/empty/missing/NA values.
- Functions or operators may or may not allow null arguments (e.g., you can’t divide seven by null).
Aggregation Function | Description | Example | Nullability |
avg(X) |
Average of a field across records. |
avg(numericField) |
a |
collect(X) |
Returns last n values of a field across records. collect(fieldName,valuesCount) Parameters:
|
collect(symbol,3) |
a |
count(X) |
Counts the number of records. |
count() |
|
delta(X) |
Returns the difference of the last and second last value of the integer field. |
delta(numericField) |
a |
first(X) |
First value of a field. |
first(fieldName) |
a |
firstNonNull(X) |
First non-null value of a field. |
firstNonNull(fieldName) |
a |
last(X) |
Last value of a field. |
last(fieldName) |
a |
lastNonNull(X) |
Last non-null value of a field. |
lastNonNull(fieldName) |
a |
max(X) |
Maximum of an integer field across records. |
max(fieldName) |
a |
min(X) |
Minimum of an integer field across records. |
min(fieldName) |
a |
prev(X) |
Previous values of a field record. |
prev(fieldName) |
a |
samples(X) |
Count of non-null values of field records. |
samples(fieldName) |
a |
sdevp(X) |
Returns the standard deviation of an entire population. |
sdevp(numericField) |
a |
sdevs(X) |
Estimates standard deviation based on a sample. |
sdevs(numericField) |
a |
sum(X) |
Sums a field across records. |
sum(numericField) |
a |
varp(X) |
Returns the variance in an entire population. |
varp(numericField) |
a |
vars(X) |
Returns the variance based on a sample. |
vars(numericField) |
a |
wavg(X) |
Weighted average of a field across records. wavg(score,weight) Parameters:
|
wavg(marks,weight) |
a |
NOTE: The following aggregates work with a time window (can subtract): count, samples, sum, sdev, var, and avg
(c) 2013-2024 Altair Engineering Inc. All Rights Reserved.