CCL Subqueries in Expressions

It is useful to use a value in an expression that gets computed by a separate continuous query.

It is often useful to use a value in an expression that gets computed by a separate continuous query. For example, the moving average of a stock price often represents a significant threshold for making decisions. A query that computes the average of the stock price in a window would produce a continuous stream of values representing the current moving average of stock price.

Subqueries can be included in the FROM clause and WHERE clause of the outer query and use similar syntax to a Query statement, but without an INSERT clause. For details about the syntax and usage of subclauses, see CCL Subqueries in the FROM Clause and CCL Subqueries in the WHERE Clause.