new to grafana I have made 6 graphs 5 of which work but stuck on this one.
my data is daily energy consumption so id like to show how much energy was used each month on a graph period of a year. So like 300kw for January, 250kw for February etc
I need to sum the max value of each day into a group of a month and display 12 months.
But i am stuck this query shows the sum of max for last week in one graph but unable to get it to show month and then get it to display 12 months worth not in one giant bar.
SELECT SUM(“max”) FROM (SELECT MAX(“value”) FROM “Kw” WHERE “entity_id” = ‘daily_energy’ AND time >= now() - 7d GROUP BY time(1d))