InfluxDB复合查询

时间:2015-05-15 14:39:02

标签: node.js influxdb

为什么这个功能没有带来结果?在Influxdb。

select * from items.movement
  where time > now() - 7d
    and oldContainerId='aaaaaa'
    and newContainerId='aaaaaaa'

感谢。

2 个答案:

答案 0 :(得分:1)

我解决了这个问题:

select * from series
  where time > now() - 7d
    and newContainerId = 'aaaa'
  limit 100;
select * from series
  where time > now() - 7d
    and oldContainerId = 'aaaa'
  limit 100

答案 1 :(得分:0)

select *  from "items.movement" where time > now() - 7d and oldContainerId = 'aaaaaa' and newContainerId = 'aaaaaaa'

注意:空格和双引号很重要。