多个语句
更新时间:
在查询中请使用分号(;)将多个SELECT语句隔开。
示例
CLI
在TSDB For InfluxDB®的CLI中:
> SELECT MEAN("water_level") FROM "h2o_feet"; SELECT "water_level" FROM "h2o_feet" LIMIT 2name: h2o_feettime mean---- ----1970-01-01T00:00:00Z 4.442107025822522name: h2o_feettime water_level---- -----------2015-08-18T00:00:00Z 8.122015-08-18T00:00:00Z 2.064
HTTP API
使用TSDB For InfluxDB®的HTTP API:
{"results": [{"statement_id": 0,"series": [{"name": "h2o_feet","columns": ["time","mean"],"values": [["1970-01-01T00:00:00Z",4.442107025822522]]}]},{"statement_id": 1,"series": [{"name": "h2o_feet","columns": ["time","water_level"],"values": [["2015-08-18T00:00:00Z",8.12],["2015-08-18T00:00:00Z",2.064]]}]}]}
InfluxDB® is a trademark registered by InfluxData, which is not affiliated with, and does not endorse, TSDB for InfluxDB®.
该文章对您有帮助吗?