Implicit windows are created when the query does not have an explicit policy (window) clause, and the query is executed as a continuous query (see Executing a Continuous Query).The lifecycle of an entity within an implicit window is affected by the life cycle of that entity in the cache:
● When an entity in the scope of the query is added to the cache or is updated in the cache, it is automatically added to the window.The example shows a group by 1 clause. This is a dummy group, required because aggregate functions, count(*) in this case, require a group by clause.Suppose that for the first 10 minutes after the query statement is executed, 100 events are created in quick succession. Every time the query receives a new event notification, the count goes up progressively until it stabilizes at 100.Suppose that thirty minutes later, 50 of those 100 events are consumed by a rule or expire because of their time to live (TTL) settings. The events are deleted from the cache. The query receives deletion notifications and the query output, count(*), changes until it drops and stabilizes at 50.
The above query joins Department and Student entities using the department name. It then keeps a count and an average of age of students per department.
The above query keeps count of the number of students per department. Every time a student enrolls or leaves, the count changes and the query produces the entire list sorted on the count.
Copyright © TIBCO Software Inc. All Rights Reserved.