ANY

<< Click to Display Table of Contents >>

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

ANY

Previous pageReturn to chapter overviewNext page

ANY returns true if the supplied boolean_expression is true in any of the selected rows; and returns false if the supplied boolean_expression is true in none of the selected rows.

ANY is the dual of EVERY.

Syntax

ANY ( <boolean_expression> )

 

Example

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

SELECT ANY (ticker < 1) FROM trades

 GROUP BY (FLOOR trades.rowtime to hour)