I want to return the sum of all values after transforming them.
Here is my current query:
I’d like it to return just a single value, which is all the values summed.
I want to return the sum of all values after transforming them.
Here is my current query:
I’d like it to return just a single value, which is all the values summed.
Figured it out, it can be solved by using a sub query like shown:
SELECT sum(bytes) FROM (
SELECT non_negative_difference("bytes_sent") as bytes FROM "net" WHERE ("interface" = 'eth0' AND "host" =~ /^$host$/) AND $timeFilter
)