4.2 CQL list

There are two types of CQL: definition CQL for defining streams and queries, and data manipulation CQL that is used in the REGISTER QUERY and REGISTER QUERY_ATTRIBUTE clauses of definition CQL.

The following table lists the definition CQL.

Table 4-1 Definition CQL list

No.CQLExplanation
1REGISTER STREAM clauseDefines a stream
2REGISTER QUERY clauseDefines a query.
3REGISTER QUERY_ATTRIBUTE clauseSpecifies time division for a query. The query for which time division is to be used must be defined following this clause.

The following table lists the data manipulation CQL.

Table 4-2 Data manipulation CQL list

No.TypeExplanation
1InquirySearches data in a relation or the stream defined in the REGISTER STREAM clause.
2Stream clauseConverts data to be output into a stream.
3Relation expressionSearches data in one or more relations and filters the results of the search.
4SELECT clauseSpecifies how the searched result (select expression) is to be output and acquires the search result as a relation.
5FROM clauseSpecifies one or more relations (relation references). Relations acquired by the FROM clause becomes the target of the WHERE or HAVING clauses.
6WHERE clauseSpecifies a search condition for a relation acquired by the FROM clause.
7GROUP BY clauseSpecifies the columns (grouped columns) in the relation acquired by the preceding clause. Grouping is performed on the specified grouped columns only.
8HAVING clauseSpecifies a search condition for a relation acquired by the FROM clause, WHERE clause, or GROUP BY clause. A search condition specified in the HAVING clause executes a logical operation, and only the true results are acquired as a relation.
9UNION clauseLinks together multiple SELECT clauses and executes them as a single CQL statement.
10Selection listSpecifies one or more select expressions.
11Select expressionSpecifies the item to be output from a search result.
12Aggregate functionsCalculates a value from multiple rows.
13Column specification listSpecifies one or more columns.
14Relation referenceSpecifies the relation to be searched. Relation reference is specified using the FROM clause.
15Window specificationSpecifies how long stream data stays in a relation. Window specification is specified using a relation reference.
16Time specificationSpecifies a time unit.
17Search conditionExecutes a logical operation using the specified condition and acquires only true results as a new relation.
A search condition is specified using the WHERE or HAVING clauses.
18Comparison predicateSpecifies the condition for determining a true or false logical value.
19Value expressionSpecifies a value.
20ConstantSpecifies a constant.