How to combine PostgreSQL with time interval on grafana?

image
Hello all, I’m using PostgreSQL database to do some reports in grafana, I’m a beginner and still learning, and I need help because I don’t know how to connect $__timeFilter and connect data with grafana time range

welcome to the :grafana: forum, @aleeulinick

hmmm, have you seen this doc that helps explain global variables?

1 Like

Hi!
I am facing the same problem.

Can’t find a solution on how to use correctly the $__interval inside PostgreSQL query!

Did you find any solution? Unfortunately even the support didn’t help me here …

Something like this?

SELECT $__timeGroupAlias(heure, $__interval), avg(duree)
	FROM public.chronogram
GROUP BY 1
ORDER BY 1

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.