Complete the code to find documents where age is greater than 25.
db.users.find({ age: { [1]: 25 } })The $gt operator means 'greater than'. It finds documents where the age is more than 25.
Complete the code to find documents where status is either 'A' or 'B'.
db.orders.find({ [1]: [ { status: 'A' }, { status: 'B' } ] })The $or operator finds documents matching any of the conditions inside the array.
Fix the error in the query to find documents where age is greater than 20 and less than 30.
db.people.find({ [1]: [ { age: { $gt: 20 } }, { age: { $lt: 30 } } ] })The $and operator ensures both conditions are true: age greater than 20 and less than 30.
Fill both blanks to find documents where score is greater than 80 and status is 'active'.
db.results.find({ [1]: [ { score: { $gt: 80 } }, { status: [2] } ] })Use $and to combine conditions and the string 'active' for the status value.
Fill all three blanks to find documents where age is between 18 and 25 inclusive, and status is not 'inactive'.
db.users.find({ [1]: [ { age: { [2]: 18 } }, { age: { [3]: 25 } }, { status: { $ne: 'inactive' } } ] })Use $and to combine conditions, $gte for 'greater than or equal to' 18, and $lte for 'less than or equal to' 25.