Hi,

I was wondering how you can achieve a "group by" like this

select tickDataFeed, stddev(price)
from StockTickEvent(symbol='IBM').win:length(10) 
where volume > 1000
group by tickDataFeed 
having stddev(price) > 0.8

I thought of using accumulate or collect, but I'm not sure of the exact syntax. 
What I tried up to now

rule "test"
when
    $event : CountEvent() over window:time( 15s ) from entry-point "Stream"
   $grouped : Integer() from accumulate (CountEvent($c1:count), count($c1)) 
then ...

But that doesn't work. Any hints?

Best regards,

Andi


-- 
GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.  
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to