You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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.

Example

#PARSER PQL
#ADDQUERY
out = TUPLEAGGREGATE({
          method = 'MAX',
          attribute = 'id'
        },
        ELEMENTWINDOW({
            size = 5,
            slide = 5
          },
          person
        )
      )
      
out2 = TUPLEAGGREGATE({
          method = 'MIN',
          attribute = 'id'
        },
        ELEMENTWINDOW({
            size = 5,
            slide = 5
          },
          person
        )
      )
      
out3 = TUPLEAGGREGATE({
          method = 'FIRST'
        },
        ELEMENTWINDOW({
            size = 5,
            slide = 5
          },
          person
        )
      )
      
out4 = TUPLEAGGREGATE({
          method = 'LAST'
        },
        ELEMENTWINDOW({
            size = 5,
            slide = 5
          },
          person
        )
      )
  • No labels