I have two collections lets call them collection A and collection B and they both have a price field and item number. so lets say there are 2 items in each:
Collection A:
name = item1 , price = 30
name = item2 , price = 20
Collection B:
name = item1 , price = 50
name = item2 , price = 10
I want to display the items for which collection A's price is bigger than collection B's price. For the above example that would be item2 for instance.
How can I write such a query? I'm using robomongo.
(EDIT)
Follow up on my previous question;
I want to display the items for which collection A's price is bigger than collection B's price * (exchange rate) + (some constant)
Let's say condition is;
where A's price > B's price*1.5+4
so in this case it should still display the same item.
Let's say condition is;
where A's price > B's price*1.5+10
then it shouldn't display any of the items