New builder Postgresql

Dear all

How you can use windows function with the new postgresql builder ?

How you can indicate te timefilter ?

in advance thanks

which windows function are you referring to specifically?

I am using a lot the mooving average function.
This new builder is very strange, we do not find back all the options of the previous one. I am worried that I will have to use the code only.

1 Like

or use stored procedures which will never require change. builder is just a helper.

yes , builder is just an helper , but it is strange that it worse than the previous version.

1 Like

Without the builder , it is more complicated for me.

for exemple here , I do not understood why the min and max are not done correctly on all the period.

my code

SELECT
$__timeGroupAlias(mois,8760h),
min(dc) AS “min”
FROM insee_dc_naissance
GROUP BY 1

ORDER BY 1

You do not have max in your query
Your issue is really not grafana but querying issue.

I have three query : one for the value , one for the yearsly min of the value , one for the yearsly max of the value.

SELECT
mois AS “time”,
dc AS “décés”
FROM insee_dc_naissance

SELECT
$__timeGroupAlias(mois,8760h),
max(dc) AS “max”
FROM insee_dc_naissance
GROUP BY 1
ORDER BY 1

SELECT
$__timeGroupAlias(mois,8760h),
min(dc) AS “min”
FROM insee_dc_naissance
GROUP BY 1
ORDER BY 1

and I do not understood why the calculation show that ?

could you help me to find what is wrong on my query ?