Total costs by integration

Dear seemaadhav,

short question because I would like to understand the root of the problem more in depth. Above you have suggested two different methods for implementation. One based on timeGroupAlias and an alternative approach without it. In your last posting you have provided a reasonable explanation why the timeGroupAlias approach might not work in context of InfluxDB. However, your second suggestion does not rely on this function. Do you have any idea why this works neither?

I am just curious and want to attain a better understanding of the problem.

Thanks in advance and kind regards,
Roman.

Hi @star314junkgr can you please share whats the error you are getting?
Also, I would suggest that for more sql queries related stuff you should try on InfluxDb forum, so that you can get precise help.

Hello seemaadhav,

the command

SELECT cumulative_sum(integral("m_value")) / 3600 FROM ( select mean("value") as m_value from "W" where $timeFilter and "entity_id" = 'gosund09_power' GROUP BY time(1m) fill(0))

yields the error message

InfluxDB Error: cumulative_sum aggregate requires a GROUP BY interval

Kind regards!