Hello, i have a project about a water level visualization.
you can see the graph below. Now I want to calculate the volume of water going in and out per hour/day.
The plan was to
get the difference of each value with the value before (how much hight was added)
absolut value of those differences
integral of this area beneath the “graph”
sum up by hour/day/…
1st and 2nd i got working but it seems like sum & abs are not working together, because i get basically 0 as result, so it must be NOT taking the abs.values but the +/- values.
Hope someone can help?
SELECT SUM(“diffe”) AS sum FROM
SELECT abs(difference(mean(“value”))) AS diffe FROM “Schacht_Distanz” WHERE $timeFilter GROUP BY time(1m) fill(null)
GROUP BY time(1h)