| Exam Name: | MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+) | ||
| Exam Code: | C100DBA Dumps | ||
| Vendor: | MongoDB | Certification: | MongoDB Certified DBA Associate |
| Questions: | 172 Q&A's | Shared By: | erica |
A collection named products contains the following documents:
{ " _id " : 1, " name " : " Laptop " , " price " : 1500 }
{ " _id " : 2, " name " : " Smartphone " , " price " : 800 }
{ " _id " : 3, " name " : " Tablet " , " price " : 600 }
{ " _id " : 4, " name " : " Monitor " , " price " : 300 }
{ " _id " : 5, " name " : " Headphones " , " price " : 200 }
Given the following query:
db.products.find().sort({ " price " : -1 }).limit(2)
What is the expected output?
Consider a products collection:
{ " _id " : 1, " item " : " t-shirt " , " color " : " red " , " price " : 10 }
{ " _id " : 2, " item " : " sweater " , " color " : " green " , " price " : 20 }
{ " _id " : 3, " item " : " belt " , " color " : " black " , " price " : 15 }
{ " _id " : 4, " item " : " hat " , " color " : " green " , " price " : 12 }
What operation modifies the price of all products that have a color value of " green " ?