Hi everyone
I’m trying to get the first occurrence which attends both conditions. If I use “OR” it returns the data, but if I use “AND” I get nothing.
select first(value), tagCode from raw
where (tagCode = 'TEMP_CAPTADOR_C3' and value > 70)
or (tagCode = 'NIVEL_DONELLY' and value = 1)
My sample data:
{"value": 78.4, "tagCode": "TEMP_CAPTADOR_C3", "time": "2017-06-07T08:35:19Z"},
{"value": 1, "tagCode": "NIVEL_DONELLY", "time": "2017-06-07T08:35:59Z"}
Thanks