Combining the WITHIN and GROUP BY Clauses

[This is preliminary documentation and subject to change.]

The WITHIN clause can be used in conjunction with the GROUP BY clause. The order of these clauses is not important although they must follow the WHERE clause as shown in the following syntax:

select <property_list> from <class> 
   <WHERE clause> GROUP WITHIN interval BY property_list
 

The interval that follows the WITHIN keyword specifies the number of seconds that should pass before an aggregate event is sent. The property list that follows the BY keyword specifies the properties that are included in the event class.

To handle a query that contains the WITHIN and GROUP BY clauses, CIMOM performs the following tasks:

  1. Filters incoming events based on critieria in WHERE clause.
  2. Computes the values of the properties in the property list for each matching event.
  3. Places the event in a bin that contains other events with the same property values.
  4. Generates one aggregate event for each of the bins after the number of seconds specified by the interval in the WITHIN clause has passed. Empties each bin after the event has been sent.