Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{"currentprice":1,"expectedprice":2},{"currentprice":1,"expectedprice":4}]
Query
db.collection.find({$expr:{$lt:["$currentprice",{$multiply:["$expectedprice",NumberDecimal("0.5")]}]}})
Result