Tickscript - not calculating as intended



I am running a tickscript to down sample / sum my data per hour for further use related to some analytics activites related to my energy consumption.

Tickscript looks like this:

|query('SELECT sum(kWh) as total FROM "iotawatt"."autogen".l2l3kwh')

I though the above script would sum all my values and group by hour, but when I compare the output towards my original data there is a clear mismatch.

I assume there is something in my tickscript that is not correct. Any ideas?


Hello @Stian_Braa,
Your Tickscript looks great to me. Can you please share how you’re producing the histogram above?