MongoDB Developer Associate Practice Questions - MongoDB Associate Developer Certification Exam

Access More Questions
You want to create a compound index on the 'orders' collection to efficiently support queries that filter on 'customerId' and sort by 'orderDate' descending. Which command is correct?
Correct Answer:
db.orders.createIndex({ customerId: 1, orderDate: -1 })

Access more questions from this quiz

Continue to MongoDB Developer Associate Practice Questions - MongoDB Associate Developer Certification Exam for more practice questions and the full quiz experience.

Access More Questions