Thanks for the difference() function. I’ve rewritten my query but still blocked.
Here is now my query which does the same result as before. I’m not allowed to upload csv nor txt.
At the end, i get 3 tables. I’ve tried to regroup all the table in one unique table then resplit the table based on “_time”
with the hope to sum all rows for each table (based on _time) but it does not work.
Here is the csv before the last “group” function.
Blockquote ,result,table,_start,_stop,_time,_value,_field,_measurement,device
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T07:00:00Z,0,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T08:00:00Z,149,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T09:00:00Z,829,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T10:00:00Z,1352,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T11:00:00Z,865,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T12:00:00Z,644,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T13:00:00Z,558,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T14:00:00Z,155,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T15:00:00Z,3,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T16:00:00Z,0,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T17:00:00Z,0,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T05:00:00Z,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T07:00:00Z,0,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T08:00:00Z,6,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T09:00:00Z,79,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T10:00:00Z,91,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T11:00:00Z,118,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T12:00:00Z,154,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T13:00:00Z,134,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T14:00:00Z,48,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T15:00:00Z,64,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T16:00:00Z,5,energy,2120198970,2120198970
,0,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T17:00:00Z,0,energy,2120198970,2120198970
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T07:00:00Z,0,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T08:00:00Z,228,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T09:00:00Z,571,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T10:00:00Z,978,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T11:00:00Z,773,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T12:00:00Z,628,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T13:00:00Z,537,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T14:00:00Z,158,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T15:00:00Z,3,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T16:00:00Z,0,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T17:00:00Z,0,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T05:00:00Z,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T07:00:00Z,0,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T08:00:00Z,7,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T09:00:00Z,81,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T10:00:00Z,92,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T11:00:00Z,120,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T12:00:00Z,157,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T13:00:00Z,136,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T14:00:00Z,50,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T15:00:00Z,65,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T16:00:00Z,5,energy,2120199320,2120199320
,1,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T17:00:00Z,0,energy,2120199320,2120199320
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T07:00:00Z,0,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T08:00:00Z,145,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T09:00:00Z,514,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T10:00:00Z,1135,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T11:00:00Z,806,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T12:00:00Z,632,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T13:00:00Z,547,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T14:00:00Z,153,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T15:00:00Z,3,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T16:00:00Z,0,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-15T17:00:00Z,0,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T05:00:00Z,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T07:00:00Z,0,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T08:00:00Z,8,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T09:00:00Z,80,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T10:00:00Z,91,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T11:00:00Z,118,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T12:00:00Z,153,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T13:00:00Z,133,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T14:00:00Z,50,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T15:00:00Z,64,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T16:00:00Z,5,energy,2120199323,2120199323
,2,2020-11-14T18:09:54.731857098Z,2020-11-16T18:09:54.731857098Z,2020-11-16T17:00:00Z,0,energy,2120199323,2120199323