sql - Custom grafana $timeFilter - Stack Overflow

admin2025-03-19  0

I'm using this query to fetch data for current day power consumption in order to display in a bar chart.

SELECT mean("value") 
FROM "Dataset" 
WHERE "measurement" = 'Ea+' 
  AND time >= '2024-11-18T22:00:00Z'
  AND time <= '2024-11-19T22:00:00Z'
GROUP BY time(1h) 
FILL(null)

The problem is I didn't find any other way to get the result wanted without using exact timestamps... Is there any way I can get some sort of variable like $timeFilter which would fetch the right values for current day?

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1742377088a210502.html

最新回复(0)