Place a MATCHING clause with a not (!) condition on an output stream.
The example creates a schema named TradeSchema, then creates an input window named InTrades and an output stream named TradeOut, both of which reference TradeSchema.
TradeOut uses MATCHING not (!) syntax to retrieve data for stocks that trade twice, but not three times in a 10-millisecond period.
CREATE OUTPUT STREAM TradeOut SCHEMA TradeSchema as SELECT SecondTrade.* FROM InTrades as FirstTrade, InTrades as SecondTrade, InTrades as ThirdTrade MATCHING [10 milliseconds: FirstTrade , SecondTrade, !ThirdTrade ] ON FirstTrade.Symbol = SecondTrade.Symbol = ThirdTrade.Symbol ;
The example attaches a File CSV Input adapter named csvInConn1 to InTrades. The example also attaches a File CSV Output adapter named csvOut to TradeOut to publish the matching results to a file, since data cannot be viewed in-stream.