Use a UNION operator in your CCL query to combine the results of two or more queries into a single result.
When combining two or more queries, duplicate rows are eliminated from the result set unless you specify otherwise.
CREATE INPUT WINDOW InStocks
SCHEMA StocksSchema
Primary Key (Ts)
;
CREATE INPUT WINDOW InOptions
SCHEMA OptionsSchema
Primary Key (Ts)
;
CREATE output Window Union1
SCHEMA OptionsSchema
PRIMARY KEY DEDUCED
AS SELECT s.Ts as Ts, s.Symbol as StockSymbol,
Null as OptionSymbol, s.Price as Price, s.Volume as Volume
FROM InStocks s
UNION
SELECT s.Ts as Ts, s.StockSymbol as StockSymbol,
s.OptionSymbol as OptionSymbol, s.Price as Price,
s.Volume as Volume
FROM InOptions s
;