REGISTER QUERY::=REGISTERQUERY
query-name
inquiry
Defines a query.
This clause registers a query to the query management table (part of the query repository), and begins query processing.
query-name
Specify any query name that is unique within the stream data processing system. For details about specifying names, see 3.2.4 Specifying names.
The name specified here becomes the name of the stream returned by an inquiry (output stream) or a relation.
inquiry
Defines an inquiry. For details about definitions, see 4.4.1 Inquiry.
Specify all inquiries for a single query in a single definition. For example, when defining a query q1, specify all of the necessary inquiries as shown in Example 1.
REGISTER QUERY q1 SELECT s1.a, s1.b FROM s1[ROWS 10];
If the inquiries are divided and specified for the query q1, as shown in Example 2, two queries with the same name end up being specified, resulting in an error.
REGISTER QUERY q1 SELECT s1.a FROM s1[ROWS 10];
REGISTER QUERY q1 SELECT s1.b FROM s1[ROWS 10];
None.
Defines a query q1 that outputs data from column a of stream s1.
REGISTER QUERY q1 SELECT s1.a FROM s1[ROWS 10];