全部产品
云市场
云游戏

多个语句

更新时间:2020-07-01 09:29:51

在查询中请使用分号(;)将多个SELECT语句隔开。

示例

CLI

在TSDB For InfluxDB®的CLI中:

  1. > SELECT MEAN("water_level") FROM "h2o_feet"; SELECT "water_level" FROM "h2o_feet" LIMIT 2
  2. name: h2o_feet
  3. time mean
  4. ---- ----
  5. 1970-01-01T00:00:00Z 4.442107025822522
  6. name: h2o_feet
  7. time water_level
  8. ---- -----------
  9. 2015-08-18T00:00:00Z 8.12
  10. 2015-08-18T00:00:00Z 2.064

HTTP API

使用TSDB For InfluxDB®的HTTP API:

  1. {
  2. "results": [
  3. {
  4. "statement_id": 0,
  5. "series": [
  6. {
  7. "name": "h2o_feet",
  8. "columns": [
  9. "time",
  10. "mean"
  11. ],
  12. "values": [
  13. [
  14. "1970-01-01T00:00:00Z",
  15. 4.442107025822522
  16. ]
  17. ]
  18. }
  19. ]
  20. },
  21. {
  22. "statement_id": 1,
  23. "series": [
  24. {
  25. "name": "h2o_feet",
  26. "columns": [
  27. "time",
  28. "water_level"
  29. ],
  30. "values": [
  31. [
  32. "2015-08-18T00:00:00Z",
  33. 8.12
  34. ],
  35. [
  36. "2015-08-18T00:00:00Z",
  37. 2.064
  38. ]
  39. ]
  40. }
  41. ]
  42. }
  43. ]
  44. }


InfluxDB® is a trademark registered by InfluxData, which is not affiliated with, and does not endorse, TSDB for InfluxDB®.