Excluding unique sessions in a singlestat from Elasticsearch datasource (Performing difference operation)

Currently I’ve two singlestats, one represents total sessions and the other one represents unique sessions. But, I’m mainly interested in the difference of these two i.e., to represent the “not unique sessions”.

  1. Is there a way minus functions can be achieved at a query level?
  2. Is there a way a subtraction can be done by taking the values from two different single stats?

Expected result: I want to display 894 - 283 i.e., 611 in the third singlestat.

Use singlestat math plugin, where you can do this kind of math: