Influxdb 如何使用时间范围从流入中获取总和值?

Influxdb 如何使用时间范围从流入中获取总和值?,influxdb,Influxdb,我使用Influx来记录一些串行数据,并显示这些数据的报告 我有这样的要求: 获取2017-05-11至2017-05-17期间上午07:00至上午09:00的值的总和 在mysql中,这非常简单,因为您可以通过一个查询获得此值: select sum(value) from series where time(time) >= '07:00:00' and time(time) < '09:00:00' and time > '2017-05-11' and time <

我使用Influx来记录一些串行数据,并显示这些数据的报告

我有这样的要求:

获取2017-05-11至2017-05-17期间上午07:00至上午09:00的值的总和

在mysql中,这非常简单,因为您可以通过一个查询获得此值:

select sum(value) from series where time(time) >= '07:00:00' and time(time) < '09:00:00' and time > '2017-05-11' and time < '2017-05-19'
从时间(time)>='07:00:00'和时间(time)<'09:00:00'和时间>'2017-05-11'和时间<'2017-05-19'的序列中选择总和(值)
但是在Influx中(我现在使用的是1.0.2),我看不到任何这样的函数,Influx支持这样的查询吗?

您可以使用这个-

select sum(value) as summed_value from series where time> '2017-03-10 00:00:00' and time<'2017-05-10 00:00:00';

选择sum(value)作为时间序列中的sum\u value,其中time>'2017-03-10 00:00:00'和time now()-2400h和timeNo,就像我列出的示例一样,我想得到多天的总和,而不是一天的总和,比如说,我需要上周五到今天上午7:00到10:00的值总和,因此,它将是3个范围,不仅是一个,没有直接查询相同的,但您可以通过组合多个查询并在每个查询中使用group by来实现。这是不可行的,您的意思是我必须每天搜索总和,并将它们全部加在一起?
 select sum(value) as summed_value from series where time> now() - 2400h and time<now() - 1200h;