Calculation during query

I have collection A like so:
Title, numTotalStock

and collection B like so:
reffield(toCollectionA), Title, numReservedStock

Now I would like to build a query which does this:
“where A.numTotalStock-B.numReservedStock >0”

Is this possible? Been looking at aggregates, but can´t work out if that gives me what I want.