define stream fireAlarmEventStream (deviceID string, temp int);
from fireAlarmEventStream#window.time(7886776 sec)
select deviceID, max(temp) as maxValue
group by deviceID
insert into analyzeStream for expired-events;
from analyzeStream[maxValue < 88]
select maxValue
insert into bulbOnStream;
from fireAlarmEventStream[temp > 1093]
select deviceID, temp
insert into bulbOffStream;
define stream fireAlarmEventStream (deviceID string, temp int);
from fireAlarmEventStream#window.time(10 sec)
select deviceID, max(temp) as maxValue
group by deviceID
insert into analyzeStream for expired-events;
from analyzeStream[maxValue < 60]
select maxValue
insert into bulbOnStream;
from fireAlarmEventStream[temp > 60]
select deviceID, temp
insert into bulbOffStream;
Fix invalid values in cep query
Fix invalid values in cep query
