需要您的帮助,我想用图形时间序列在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"
请帮助我们的案子
谢谢