<< Click to Display Table of Contents >>

Navigation:  Streaming SQL Reference Guide > Basic Building Blocks > Functions > Built-in Functions >


Previous pageReturn to chapter overviewNext page

EVERY returns true if the supplied boolean_expression is true in all of the selected rows; and returns false otherwise, that is, if the supplied boolean_expression is false in any of the selected rows.

EVERY is the dual of ANY.


EVERY ( <boolean_expression> )



The following SQL snippet returns 'true' if the price for every ticker in the stream of trades is below 1; and 'false' if any price is 1 or greater.

SELECT EVERY (ticker < 1) FROM trades

 GROUP BY (FLOOR trades.rowtime to hour)