The following text is from http://avid.cs.umass.edu/sase/index.php?page=language (slighty modified to the capabilities of Odysseus)

The SASE+ language has a high-level structure similar to SQL for ease of use. The design of the language, however, is centered on temporal event patterns that have not been sufficiently addressed in relational data processing. In particular, SASE+ has the following features:

The overall structure of the SASE+ language is:


PATTERN < pattern structure >
[WHERE < pattern matching condition >]
[WITHIN < sliding window >]
[ENDS AT] < attribute with temporal condition >
[RETURN < output specification >]

The PATTERN, WHERE and WITHIN clauses form the pattern matching block. The PATTERN clause specifies the structure of a pattern to be matched against the input stream. The WHERE clause, if present, imposes value-based constraints on the events addressed by the pattern. The WITHIN clause further specifies a sliding window over the entire pattern.

The evaluation of PATTERN, WHERE, and WITHIN clauses results in a stream of pattern matches; each consists of a unique sequence of events used to match the pattern. The HAVING clause further filters each pattern match by applying predicates on the constituent events.

Finally, the RETURN clause transforms each pattern match into a result event for output. Although expressions are possible, in Odysseus only attributes should be used in the RETURN statement

Syntax of our Implemenation