Excerpt | ||
---|---|---|
| ||
Siddhi Inbuilt Aggregate Functions in wiki format |
...
Syntax | <int|long|double|float> max(<int|long|double|float> arg) |
---|---|
Extension Type | Aggregate Function |
Description | Returns the maximum value for all the events. |
Parameter | arg : The value that needs to be compared to find the maximum value. |
Return Type | Returns the maximum value in the same data type as the input. |
Example | max(temp) returns the maximum temp value recorded for all the events based on their arrival and expiry. |
Minimum
Anchor | ||||
---|---|---|---|---|
|
Syntax | <int|long|double|float> min(<int|long|double|float> arg) |
---|---|
Extension Type | Aggregate Function |
Description | Returns the minimum value for all the events. |
Parameter | arg : The value that needs to be compared to find the minimum value. |
Return Type | Returns the minimum value in the same type as the input. |
Example | min(temp) returns the minimum temp value recorded for all the events based on their arrival and expiry. |
...
Syntax | <double> stddev(<int|long|double|float> arg) |
---|---|
Extension Type | Aggregate Function |
Description | Returns the calculated standard deviation for all the events. |
Parameter | arg : The value that should be used to calculate the standard deviation. |
Return Type | Returns the calculated standard deviation value as a double. |
Example | stddev(temp) returns the calculated standard deviation of temp for all the events based on their arrival and expiry. |
Distinct Count
Anchor | ||||
---|---|---|---|---|
|
Syntax | <long> distinctcount(<int|long|double|float|string> arg) |
---|---|
Extension Type | Aggregate Function |
Description | Aggregate function to returns Returns the count of distinct occurances of occurrences for a given arg |
Parameter | arg : The value that should be counted |
Return Type | Returns the count of distinct occurances of for given arg |
Example |
|
Forever Maximum
Anchor | ||||
---|---|---|---|---|
|
Syntax | <int|long|double|float> maxForever (<int|long|double|float> arg) |
---|---|
Extension Type | Aggregate Function |
Description | Attribute This is the attribute aggregator to store the maximum value for a given attribute throughout the lifetime of the query regardless of any windows in-front. |
Parameter | arg : The value that needs to be compared to find the maximum value. |
Return Type | Returns the maximum value in the same data type as the input. |
Example | maxForever(temp) returns the maximum temp value recorded for all the events throughout the lifetime of query |
Forever Minimum
Anchor | ||||
---|---|---|---|---|
|
Syntax | <int|long|double|float> minForever (<int|long|double|float> arg) |
---|---|
Extension Type | Aggregate Function |
Description | Attribute This is the attribute aggregator to store the minimum value for a given attribute throughout the lifetime of the query regardless of any windows in-front. |
Parameter | arg : The value that needs to be compared to find the minimum value. |
Return Type | Returns the minimum value in the same data type as the input. |
Example | minForever(temp) returns the minimum temp value recorded for all the events throughout the lifetime of query |
...