The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/tsdb/grafana-postgresql-datasource/testdata/table/time_group_compat_case2.sql

10 lines
415 B

-- SELECT $__timeGroup("t",5m,NULL) ,avg(v) FROM tbl GROUP BY 1
-- we change behavior based on what follows the timegroup, see:
-- https://github.com/grafana/grafana/blob/0b4c81158ea32a671e7788b888b086082343407c/pkg/tsdb/grafana-postgresql-datasource/macros.go#L36
CREATE TEMPORARY TABLE tbl (
t timestamp with time zone,
v double precision
);
INSERT INTO tbl (t, v) VALUES
('2023-12-24 14:30:03 UTC', 42);