Reputation: 130
If there is a need to calculate the average temperature of all devices every 5 minutes, how to implement this query statement in Apache IoTDB? Our devices are divided into different kinds, and our need is, for example, to get the average value of air conditioning type equipment every 5 minutes. Our time series looks like this: root.xxxx.aircondition.xx.xx.device_1.temperature
. It is impossible for us to create a new continuous query for each equipment, so I want to ask for a more convenient query solution.
Upvotes: 0
Views: 20
Reputation: 134
If your time series are with the same name structure in Apache IoTDB (like you mentioned in the question), try to use select avg temperature from root.xxxx.aircondition.xx.xx.* group by time range
to obtain the average value you want.
Upvotes: 1