Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db.inventory.insertMany([
- {tags:"red",quantity:4},
- {tags:"blue",quantity:4},
- {tags:"red",quantity:3}
- ]);
- db.inventory.find({
- $and:[
- {destination : { $exists: false }},
- {items:
- { $and:
- [
- $or:[
- {tags : "red"},
- {tags : "blank"}
- ],
- {quantity: { $mod: [ 4, 0 ] }}
- ]
- }
- }
- ], { _id: 0, name: 1}
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement