欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Influxdb 分组查询 bug

程序员文章站 2022-07-15 22:02:14
...

 

查询时 用日期查 

select first(0x00060001) as 0x00060001 from update_gadget_attr group by time(12h) fill(null) where time >'2015-05-21 00:00:01' and time < '2015-05-21 23:00:00' and gadget_id='e346d10a10bdc186b62cdd4f3e2298c8df254204'

结果结果正确返回2条记录

郎知  17:09:35

如果用 秒查询

select first(0x00060001) as 0x00060001 from update_gadget_attr group by time(12h) fill(null) where time >1432137600s and time < 1432220400s and gadget_id='e346d10a10bdc186b62cdd4f3e2298c8df254204'

结果返回6条记录,

 

查询2015-05-20的返回三条记录,这才是想要的结果

select first(0x00060001) as 0x00060001 from update_gadget_attr group by time(3h) fill(null) where time >1432051200s and time < 1432134000s and gadget_id='e346d10a10bdc186b62cdd4f3e2298c8df254204'