MongoDB
C100DBA · Question #108
C100DBA Question #108: Real Exam Question with Answer & Explanation
Sign in or unlock C100DBA to reveal the answer and full explanation for question #108. The question stem and answer options stay visible for context.
Question
Consider that the posts collection contains an array called ratings which contains ratings given to the post by various users in the following format: Which of the following query will return all the documents where the ratings array contains elements that in some combination satisfy the query conditions?
Exhibit
Options
- Adb.inventory.find( { ratings: { $elemMatch: { $gte: 3, $lte: 6 } } } )
- Bdb.inventory.find( { ratings: { $elemMatch: { $gt: 3, $lt: 6 }
- Cdb.inventory.find( { ratings: { ratings.$: { $gt: 5, $lt: 9 } } } )
- Ddb.inventory.find( { ratings: { ratings: { $gt: 5, $lt: 9 } } } )
Unlock C100DBA to see the answer
You've previewed enough free C100DBA questions. Unlock C100DBA for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
