Lab 5  Joined Metrics Queries
When working with Metrics in Sumo you can perform basic math operations (+, , *, /) on query results. Math expressions support the same set of functions as the eval operator so you can use sin, cos, abs, log, round, ceil, floor, tan, exp, sqrt, min, and max.
For example, if you are ingesting network information, you could use metrics queries and math operations to chart the net difference of incoming and outgoing network traffic.

Open a new Metrics window

In the first row, define the incoming traffic as the result of rate and sum (to simplify the data). This will become our variable #A, please notice you do not need to declare #A as a variable, just Enter the following:
metric=Net_InBytes  rate  sum
By virtue of adding this query to the first line, we can refer back to it as #A. Any query on the second line can be referenced as #B and so on. 
In the second row, define the outgoing traffic as the result of rate and sum (to simplify the data). This will become our variable #B, please notice you do not need to declare #B as a variable. Enter:
metric=Net_OutBytes  rate  sum 
In the third row subtract #A from #B. Enter:
#B  #A

Hide the A and B rows, so that your visualization only shows the difference.
You now have a basic line chart of your rate of traffic over time.