如何在Apache IoTDB中为分组聚合查询添加where条件?

How to add where condition to grouping aggregation query in Apache IoTDB?

提问人:NKZ 提问时间:11/15/2023 更新时间:11/16/2023 访问量:9

问:

目前,我在 Apache IoTDB 中的查询语句是这样的: .是否可以在 IoTDB 中将条件添加到此分组聚合查询中?有什么我可以参考的例子吗?select count(status), max_value(temperature) from root.ln.wf01.wt01 group by ([2017-11-01 00:00:00, 2017-11-01 10:00:00), 4h, 2h)where

apache-iotdb iotdb

评论


答:

0赞 caozhijia 11/16/2023 #1

在 Apache IoTDB 中,可以将条件过滤添加到查询中,例如在聚合之前添加。或者更长的命令,比如也支持。group bywhere value›0where time>=XXXX and time<=xxxx Group by ([date1time1,date2time2),1d) fill(0) align by device