v
5.3.8. Qualifying property names and stream names .......................................... 97
5.3.9. Select Distinct ........................................................................................ 97
5.3.10. Transposing an Expression Result to a Stream ...................................... 98
5.4. Specifying Event Streams: the From Clause ....................................................... 98
5.4.1. Filter-based Event Streams ..................................................................... 99
5.4.2. Pattern-based Event Streams ................................................................ 102
5.4.3. Specifying Views .................................................................................. 103
5.4.4. Multiple Data Window Views ................................................................. 104
5.4.5. Using the Stream Name ....................................................................... 106
5.5. Specifying Search Conditions: the Where Clause .............................................. 107
5.6. Aggregates and grouping: the Group-by Clause and the Having Clause .............. 108
5.6.1. Using aggregate functions ..................................................................... 108
5.6.2. Organizing statement results into groups: the Group-by clause ................ 109
5.6.3. Selecting groups of events: the Having clause ........................................ 112
5.6.4. How the stream filter, Where, Group By and Having clauses interact ........ 113
5.6.5. Comparing Keyed Segmented Context, the Group By clause and the
std:groupwin view .......................................................................................... 114
5.7. Stabilizing and Controlling Output: the Output Clause ........................................ 115
5.7.1. Output Clause Options ......................................................................... 115
5.7.2. Aggregation, Group By, Having and Output clause interaction .................. 120
5.7.3. Runtime Considerations ........................................................................ 122
5.8. Sorting Output: the Order By Clause ................................................................ 122
5.9. Limiting Row Count: the Limit Clause ............................................................... 123
5.10. Merging Streams and Continuous Insertion: the Insert Into Clause .................... 124
5.10.1. Transposing a Property To a Stream ................................................... 126
5.10.2. Merging Streams By Event Type ......................................................... 126
5.10.3. Merging Disparate Types of Events: Variant Streams ............................ 127
5.10.4. Decorated Events ............................................................................... 128
5.10.5. Event as a Property ............................................................................ 129
5.10.6. Instantiating and Populating an Underlying Event Object ....................... 129
5.10.7. Transposing an Expression Result ....................................................... 130
5.11. Subqueries .................................................................................................... 130
5.11.1. The 'exists' Keyword ........................................................................... 133
5.11.2. The 'in' and 'not in' Keywords .............................................................. 133
5.11.3. The 'any' and 'some' Keywords ........................................................... 134
5.11.4. The 'all' Keyword ................................................................................ 134
5.11.5. Multi-Column Selection ....................................................................... 135
5.11.6. Multi-Row Selection ............................................................................ 136
5.11.7. Hints Related to Subqueries ................................................................ 137
5.12. Joining Event Streams ................................................................................... 138
5.12.1. Introducing Joins ................................................................................ 139
5.12.2. Inner (Default) Joins ........................................................................... 141
5.12.3. Outer, Left and Right Joins ................................................................. 142
5.12.4. Unidirectional Joins ............................................................................. 144