如何在Apache IoTDB中查询最近一小时数据已更新的设备?

huangapple go评论79阅读模式
英文:

How to query the devices which data has been updated for the last hour in Apache IoTDB?

问题

我目前使用的是Apache IoTDB的1.1版本,我需要找到服务器中最近更新的数据。我想知道如何查询在IoTDB中最近一小时内已更新数据的设备?我应该如何编写查询语句?

英文:

I currently use Version 1.1 of Apache IoTDB, and I need to find the recent data updated in the server. I wonder how to query the devices which data has been updated in the last hour in IoTDB? How should I write the query statement?

答案1

得分: 0

在Apache IoTDB中尝试以下查询语句:select count(s1) from root.db.** where time >= now() -1h and time < now() having count(s1) > 0 align by device

英文:

Try this query statement in Apache IoTDB: select count(s1) from root.db.** where time &gt;= now() -1h and time &lt; now() having count(s1) &gt; 0 align by device.

huangapple
  • 本文由 发表于 2023年8月9日 10:40:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/76864238-2.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定