Subscribes to one or more data sources, processes the incoming rows, and publishes the results into a data stream or named window.
insert_clause |
The destination for the published rows. See INSERT Clause for more information. |
select_clause |
The select list specifying what to publish. See SELECT Clause for more information. |
from_clause |
The data sources. See FROM Clause for more information. |
matching_clause |
A pattern-matching specification. See MATCHING Clause for more information. |
on_clause |
A join condition. See ON Clause for more information. |
where_clause |
A selection condition. See WHERE Clause for more information. |
group_by_clause |
A partitioning specification. See GROUP BY Clause for more information. |
having_clause |
A filter definition. See HAVING Clause for more information. |
order_by_clause |
A sequencing definition. See ORDER BY Clause for more information. |
limit_clause |
A limit on the number of rows to publish. See LIMIT Clause for more information. |
output_clause |
A synchronization specification. See OUTPUT Clause for more information. |
The main clauses within a Query statement are processed in the following order, which affects the query's output:
FROM clause (with MATCHING conditions, if any).
WHERE clause (with MATCHING conditions, if any).
SELECT clause (in conjunction with GROUP BY, if present).
HAVING clause.
OUTPUT clause.
ORDER BY clause.
LIMIT clause.
INSERT clause.
FROM
GROUP BY
HAVING
INSERT
LIMIT
MATCHING
ON
ORDER BY
LIMIT
OUTPUT
SELECT
WHERE
INSERT INTO HourlyStockVolume SELECT Symbol, SUM(Volume) FROM StockTrades KEEP EVERY 1 HOUR GROUP BY Symbol,Buyer OUTPUT EVERY 1 HOUR;