在使用Influxql
时,我尝试以下命令
select "P_askbid_midprice1" from "/HFT/Data_HFT/OrderBook/DCIX_OB" limit 50
我得到了以下结果
name: /HFT/Data_HFT/OrderBook/DCIX_OB
time P_askbid_midprice1
---- ------------------
2015-05-30T00:00:00Z 0
2015-05-30T00:00:01Z 0
2015-05-30T00:00:02Z 0
2015-05-30T00:00:03Z 0
2015-05-30T00:00:04Z 0
2015-05-30T00:00:05Z 0
2015-05-30T00:00:06Z 0
2015-05-30T00:00:07Z 0
2015-05-30T00:00:08Z 0
2015-05-30T00:00:09Z 0
2015-05-30T00:00:10Z 0
2015-05-30T00:00:11Z 0
2015-05-30T00:00:12Z 0
2015-05-30T00:00:13Z 0
2015-05-30T00:00:14Z 0
2015-05-30T00:00:15Z 0
2015-05-30T00:00:16Z 0
2015-05-30T00:00:17Z 0
2015-05-30T00:00:18Z 0
2015-05-30T00:00:19Z 0
2015-05-30T00:00:20Z 0
2015-05-30T00:00:21Z 0
2015-05-30T00:00:22Z 0
2015-05-30T00:00:23Z 0
2015-05-30T00:00:24Z 0
2015-05-30T00:00:25Z 0
2015-05-30T00:00:26Z 0
2015-05-30T00:00:27Z 0
2015-05-30T00:00:28Z 0
2015-05-30T00:00:29Z 0
2015-05-30T00:00:30Z 0
2015-05-30T00:00:31Z 0
2015-05-30T00:00:32Z 0
2015-05-30T00:00:33Z 0
2015-05-30T00:00:34Z 0
2015-05-30T00:00:35Z 0
2015-05-30T00:00:36Z 0
2015-05-30T00:00:37Z 0
2015-05-30T00:00:38Z 0
2015-05-30T00:00:39Z 0
2015-05-30T00:00:40Z 0
但是使用命令
select "P_askbid_midprice1" from "/HFT/Data_HFT/OrderBook/DCIX_OB" WHERE time > '2016-05-30' and time < '2015-05-31'
即使它与前一个命令非常相似,我也没有得到任何命令。
该命令有什么问题?
答案 0 :(得分:1)
您需要使用or
语句而不是and
语句。时间不能同时是“2015年5月之后和”之前的“2015年5月之前”。它必须是一个或另一个。
select "P_askbid_midprice1"
from "/HFT/Data_HFT/OrderBook/DCIX_OB"
WHERE
time > '2016-05-30'
or time < '2015-05-31'