MongoDB Certified DBA Associate Exam (Based on MongoDB 4.4) C100DBA Question # 35 Topic 4 Discussion

MongoDB Certified DBA Associate Exam (Based on MongoDB 4.4) C100DBA Question # 35 Topic 4 Discussion

C100DBA Exam Topic 4 Question 35 Discussion:
Question #: 35
Topic #: 4

Given a collection posts as shown below having a document array comments, which of the following command will create an index on the comment author descending?

C100DBA Question 35


A.

db.posts.createIndex({commerits.$.author":-l});


B.

db.posts.createIndex({comments.$.author": {$desc:l>});


C.

db.posts.createIndex({comments.author":-l});


Get Premium C100DBA Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.