We have created a dashboard using SQL queries in Grafana. We want to link Grafana in-built time filter with our dashboard so that we can filter data as required. Kindly guide how can we map it? Thank you.
Thanks. Can you also guide how to create global variable for this? And how to map it with our dashboard/Query?
they are built in, and you can call them from your query
For PostgreSQL, the syntax to include template variables looks like this:
SELECT * FROM "ElectricPowerOperations" WHERE "type" IN ('Demand') AND "region" IN (${region}) AND $__timeRange(time)
More examples here.
