1. let count = db.restaurants.countDocuments({ "cuisine": "Italian", "grades.score": { $gte: 10 } }); print(count); db.restaurants.find( { "cuisine": "Italian", "grades.score": { $gte: 10 } }, { name: 1, "grades.score": 1, "address.coord": 1, _id: 0 } ).sort({ name: -1 }); 2. let count = db.restaurants.find( { "note": "A", "grades.score": { $gte: 20 } }, { name: 1, _id: 0 } ).count(); print(count); db.restaurants.find( { "note": "A", "grades.score": { $gte: 20 } }, { name: 1, _id: 0 } ).sort( { name: -1 } ) 3. db.restaurants.distinct("borough"); 4. db.restaurants.find({ "borough": "Bronx" }); 5. db.restaurants.find({ "borough": "Bronx", $expr: { $eq: [ { $size: "$grades" }, 4 ] } }); 6. db.restaurants.find({ "borough": "Bronx", $or: [ { "grades.grade": "A" }, { "grades.grade": "B" } ] }); 7. db.restaurants.find({ "borough": "Bronx", $or: [ { "grades.0.grade": "A" }, { "grades.0.grade": "B" } ] }); 8. db.restaurants.find({ name: { $regex: /[cC]offee/ } }) 9. db.restaurants.find({ borough: "Bronx", name: { $regex: /coffee/i } }) 10.db.restaurants.find({ name: { $regex: /Coffee|Restaurant/i }, name: { $not: /Starbucks/i } }) 11. db.restaurants.find({ name: { $regex: /coffee/i }, borough: { $in: ["Bronx", "Brooklyn"] }, grades: { $size: 4 } }) 12. db.restaurants.find({ name: { $regex: /^(?=.*[aeiouAEIOU]$)[aeiouAEIOU].*/, $options: "i" } })