Aggregate. Returns the average value of an expression, calculated over the rows in a window
The following example calculates the average of the Price column from the Trades stream over the last 5 minutes:
INSERT INTO OutStream SELECT AVG(Price) FROM Trades KEEP 5 MINUTES;