I'm desperately looking for a solution of building an arithmetic MongoDB query with java. For example, how do I build the following query:
((test.value1 / test.value2) * 100) > 50
I've tried the following query which didn't work:
{ {"$multiply" : [{"$divide" : ["$test.value1", "$test.value2"]}, "100"]} : {"$gt" : "50"}}
I'm not sure if nested arithmetic operations like the one above are supported. Thanks in advance for any suggestion!!!