This operator can be used to select one element from a window of elements.
Parameter
- method (String): The method that should be used for selection
- FIRST: The first element in the window
- LAST: The last element in the window
- MIN: The element with a minimal value
- MAX: The element with a maximal value
- attribute (SDFAttribute): For some methods this states the attribute for which the element should be selected.
Remark: The input must contain end time stamps, else no output will ever be produced!
Example
#PARSER PQL #ADDQUERY window = ELEMENTWINDOW({ size = 5, advance = 5 }, person ) out = TUPLEAGGREGATE({ method = 'MAX', attribute = 'id', name = 'MAX' }, window ) out2 = TUPLEAGGREGATE({ method = 'MIN', attribute = 'id' name = 'MIN', }, window ) out3 = TUPLEAGGREGATE({ method = 'FIRST', name = 'FIRST', }, window ) out4 = TUPLEAGGREGATE({ method = 'LAST', name = 'LAST' }, window )