版本 : Influxdb 1.7
直接使用cli查询时正常:
> select mean(water_level) from h2o_feet group by location
name: h2o_feet
tags: location=coyote_creek
time mean
---- ----
1970-01-01T00:00:00Z 5.359342451341401
name: h2o_feet
tags: location=santa_monica
time mean
---- ----
1970-01-01T00:00:00Z 3.530863470081006
使用http接口时,无数据返回:
curl -G http://localhost:8086/query?db=mydb --data-urlencode "q=select max(water_level) from h2o_feet group by location"
{"results":[{"statement_id":0}]}
curl 中使用聚合函数无效???