You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

InfluxQL中WHERE时间条件查询无返回结果问题排查

问题诊断与修复方案

Ah, I spot the issue immediately — your query has a critical logical error in the time range condition, which is why it returns no results.

Let’s look at your WHERE clause:

WHERE time > '2016-05-30' and time < '2015-05-31'

You’ve reversed the order of your time bounds: 2016-05-30 is chronologically later than 2015-05-31. This condition asks for timestamps that are both after a later date and before an earlier date — a logical impossibility, so no data can ever match this filter.

Fixed Query Options

If your goal was to query data between 2015-05-30 and 2015-05-31 (matching your first successful query’s date range), adjust the time bounds to follow chronological order:

select "P_askbid_midprice1" from "/HFT/Data_HFT/OrderBook/DCIX_OB" WHERE time >= '2015-05-30' and time < '2015-05-31' limit 50

If you intended to query 2016 data instead, update the upper bound to match the later year:

select "P_askbid_midprice1" from "/HFT/Data_HFT/OrderBook/DCIX_OB" WHERE time > '2016-05-30' and time < '2016-05-31' limit 50

A quick reminder: InfluxQL’s time comparisons rely on standard chronological logic — always ensure your start time is earlier than your end time, otherwise your filter will resolve to an empty set.

内容的提问来源于stack exchange,提问作者Jeremie

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 09:25:26