Add GG_TIMESTAMP to docs
@@ -2009,8 +2009,9 @@ Item|Description
---------|---------
`within <time range>`| This allows you to specify the time interval for which the aggregate values need to be retrieved. This can be specified by providing the start and end time separated by a comma as `string` or `long` values, or by using the wildcard `string` specifying the data range. For details refer examples.
`per <time granularity>`|This specifies the time granularity by which the aggregate values must be grouped and returned. e.g., If you specify `days`, the retrieved aggregate values are grouped for each day within the selected time interval.
+`AGG_TIMESTAMP`|This specifies the start time of the aggregations and can be used in the select clause.
-`within` and `par` clauses also accept attribute values from the stream.
+`within` and `per` clauses also accept attribute values from the stream.
!!! Note
The timestamp of the aggregations can be accessed through the `AGG_TIMESTAMP` attribute.
@@ -2024,7 +2025,7 @@ define stream TradeStream (symbol string, price double, volume long, timestamp l
define aggregation TradeAggregation
from TradeStream
- select symbol, avg(price) as avgPrice, sum(price) as total
+ select AGG_TIMESTAMP, symbol, avg(price) as avgPrice, sum(price) as total
group by symbol
aggregate by timestamp every sec ... year;
```
