Grafana 9.1.6
I’m trying to get a bar graph that would display my energy consumption per month.
Any help would be greatly appreciated.
Please share your query that was used to generate this data.
Can you click the pencil icon and paste the text of the query here (not a screenshot)?
SELECT
$__unixEpochGroupAlias(time,1h),
stddev(“E_CC01”) AS “E_CC01”
FROM “Energy_CC”
GROUP BY 1
ORDER BY 1
You are grouping by 1h = 1hour. You need to group it by 1 month
Do you have 12 months worth of data in that table?
What if the data spans from June 2022 to June 2023 how should the months be displayed?
Try this instead
TO_CHAR(time, 'Mon')
my database is running about 3 days
what data type is the time column in Energy_CC table?
please post the DDL/Schema/Create table of Energy_CC

that is automatically generated from my scada software
that looks like nanoseconds or milliseconds?
try
select to_timestamp(time/1000);
thank you for your help, but what if my data is collected let’s say 2 years, will it later show 24 bars representing of 2 years?
yes, but I still don’t understand