I have a question about getting the duration of a value, which I can’t wrap my head around. It’s probably a simple thing for seasoned influx/query guru’s, but please spare me ; I’m just leaning to use it all.
Ik have a table as following:
This table records values whenever the state changes of a sensor (“Vrij” means “Free” and “Bezet” means “Occupied”).
What I want to do, is to get the average duration in which the state is “Bezet”. The question is: How does the query looks like to accomplish this?