Using multiple partition by expressions
To partition a window according to multiple criteria, you can insert multiple, comma-separated expressions. For example, you can refine a previous query to produce values for different volume bands, as follows:
from t in all Tick()
partition by t.symbol, t.volume.floor()/100 retain 1
select rstream t;
In this example, the correlator applies retain 1 to each set of ticks that share both the same symbol and the same volume (to within 100). As a result, an item is output only when a replacement tick arrives for an existing symbol in an existing volume band.