Execute a query to a named window when an event occurs.
Syntax:
on eventType[(filterCondition)] [as name]
[insert into insertDefinition]
select propertyAndExpressionList
from windowName [as name]
[where conditionExpression]
[group by groupingExpressionList]
[having groupingCondition]
[order by sortExpressionList]
This syntax executes a query (SELECT statement) to the named window specified at windowName when an event of eventType occurs. A filterCondition can also be specified for the event. The AS keyword can be used to assign a name (alias).
The explanations for the other parts are the same as for the SELECT statement.