用grafana中的时间序列查询Postgres

时间:2019-09-14 15:54:21

标签: postgresql time-series grafana

需要您的帮助,我想用图形时间序列在grafana中创建数据源postgres。数据将每15分钟查询一次。

但我的查询仍然有一些错误:

SELECT $__timeGroupAlias(create_date,15m,0) AS "time",order_type,count(1) AS "count" FROM tbl_transaction WHERE $__timeFilter(create_date) and order_type in ('PURCHASE_AIRTIME','PURCHASE_PACKAGE','PAY_BILL','POSTPAID') group by time,order_type;

但下面有一些错误:

pq: syntax error at or near "AS"

capture_from_grafana

myexpectation_graph

请帮助我们的案子

谢谢

0 个答案:

没有答案