I have different devices which give me a value (let’s call it val) at different times of the day. For each device I would like to get all entries where this value is constant (or less than some fixed value, say 10) throughout the day.
With
SELECT * FROM (SELECT max(val) AS mx FROM measurement WHERE ("DevName" = 'dev1') GROUP BY time(1d) fill(null)) WHERE mx=0
I can get the max value for a single device for each day, but I don’t know how to continue from here.
Any suggestions?