Hello everyone!
Using: Grafana Cloud
Datasource: PostgresSQL v. 14+ (supabase io)
I am trying to query data based on dashboards time range with $__from
and $__to
global variables (docs here).
This is the query I wrote for timeseries chart:
SELECT
"timestamp" AS "time",
etalon,
humidity,
temperature
FROM "values"
WHERE
$__timeFilter("timestamp")
and "timestamp" >= {$__from:date}
and "timestamp" < {$__to:date}
ORDER BY 1
This results in:
I have also tried:
- Removing the curly brackets
{}
= results insyntax error near ":"
- Using just
$__from
without the:date
keyword = results in:db query error: pq: operator does not exist: timestamp with time zone >= bigint
If anyone would have any suggestion I would be so grateful!