I hope that I have been clear enough and that you understand. This is a problem I’ve been working on for some time and I still can’t find a solution. Thank you for the time you will spend helping me!

Essentially what we are doing is grouping each row by time and measurement. This will essentially put each time interval into there own table. so 12pm -> vm1(24), vm2(20), vm3(21).

Next, we perform a sum. this will perform a total of each row within a given table. In our case 12pm -> vm1 + vm2 +vm3. Now we perform an ungroup (group()) to combine the time grouped tables into one table.