Syntax Element | Description |
groupByExpr | Each groupByExpr is an expression that returns a value of a comparable type. These expressions form the group key, which determines which group each output item is a part of. Any aggregate functions in the having or select expression operate over each group separately. See
Grouping output items. |
havingExpr | The havingExpr expression filters output items. See
Filtering items in projections. |
selectExpr | The value you specify for selectExpr defines the items that are the result of the query. The correlator evaluates selectExpr to generate each item that appears in the query's output stream. The type of selectExpr identifies the type of the query's output stream. |
Kind of Expression | Valid in Projections | Description | Example |
Non-item expression | Simple and aggregate | An external variable, constant, or method call. It does not refer to any of the input items. | select currentTime; |
Item expression | Simple | A reference to the input item or a non-aggregate expression that contains at least one reference to the input item. | select a.i; select sqrt(a.x)*5.0/a.y |
Group key expression | Aggregate | An expression that returns one of the group keys can also occur in the projection. | group by a.i/10 select (a.i/10)*mean(a.x); |
Aggregate function expression | Aggregate | An expression that contains at least one aggregate function. Arguments to the aggregate function can include item expressions. | select mean(a.i); |