Hello all, I need help with a query, that I don’t know if it’s possible to solve. I have a series of measurements that contain the value of the accumulated total of KWh of my home. I use this to display in Grafana the data! The problem is that when I set the time period in grafana I get the KWh, but I would like to have it beginning in “Zero” for SELECT. I tried:
SELECT "kwh" - min("kwh") FROM "power" WHERE ("deviceId" = 'main') AND $timeFilter
But this only returns one record, and with GROUP BY the result is not the intended, I want to see the graph growing, but starting on zero.
Thank you all