【发布时间】:2019-06-18 09:09:46
【问题描述】:
我在 grafana 中为 vertica 使用 PG 插件,因为 grafana 没有原生 Vertica 插件
select date_trunc('hour', moment) as time,
sum(netSlaes) as netSales
from ba.table
group by time;
Grafana 告诉我们:
Invalid type for column time, must be of type timestamp or unix timestamp, got: string 2019-05-28 22:00:00
但是当我使用 DataGrip 时,这个 sql 会返回:
2019-05-28 05:00:00.000000 1456106.03030303
2019-05-28 11:00:00.000000 16463313.9090909
2019-05-28 13:00:00.000000 15796558.4818182
2019-05-28 14:00:00.000000 5134891.6969697
2019-05-28 20:00:00.000000 13058329.5909091
...
请帮忙说明时间列的时间戳格式
【问题讨论】: