Free MongoDB C100DEV Exam Questions

Become MongoDB Certified with updated C100DEV exam questions and correct answers

Page:    1 / 83      
Total 411 Questions | Updated On: Nov 24, 2025
Add To Cart
Question 1

Consider the following scenario: You have a MongoDB collection named users that stores user information. Each document in the collection has the following structure:
{
  "_id": ObjectId("609fe4b5728ad805aef1a88d"),
  "name": "John Doe",
  "age": 30,
  "email": "johndoe@example.com",
  "address": {
    "street": "123 Main St",
    "city": "New York",
    "state": "NY",
    "zipcode": "10001"
  }
}
You need to retrieve all the documents from the users collection and convert them to an array format. Which of the following MongoDB queries should you use for this task?


Answer: B
Question 2

Given the following orders collection in MongoDB:
[
  {
    "_id": 1,
    "customer": "John",
    "orderDetails": [
      { "productId": "P1", "quantity": 2, "unitPrice": 50 },
      { "productId": "P2", "quantity": 1, "unitPrice": 30 }
    ]
  },
  {
    "_id": 2,
    "customer": "Sara",
    "orderDetails": [
      { "productId": "P1", "quantity": 3, "unitPrice": 50 },
      { "productId": "P3", "quantity": 2, "unitPrice": 20 }
    ]
  },
  {
    "_id": 3,
    "customer": "Peter",
    "orderDetails": [
      { "productId": "P2", "quantity": 2, "unitPrice": 30 },
      { "productId": "P4", "quantity": 1, "unitPrice": 100 }
    ]
  }
]
Which MongoDB query will find all orders that contain a product with the productId of "P1" and a quantity greater than 1?


Answer: A
Question 3

Consider a MongoDB collection named orders which has documents in the following format:
{
    "_id" : ObjectId("5f5b0d2f3e3dfbcc11c84444"),
    "orderId" : 1001,
    "customerId" : 200,
    "items" : [
        {
            "productId" : 101,
            "quantity" : 2
        },
        {
            "productId" : 102,
            "quantity" : 1
        }
    ],
    "totalAmount" : 250,
    "status" : "Pending"
}
What is the correct syntax to find and update the first document in the orders collection where "status" is "Pending", and change the "status" field to "Completed" using the findAndModify method?


Answer: B
Question 4

Consider the following documents in a MongoDB collection orders:
{
   "_id": 1,
   "customer_id": 101,
   "item": "apple",
   "price": 0.5,
   "quantity": 100,
   "date": ISODate("2022-01-01T00:00:00Z")
},
{
   "_id": 2,
   "customer_id": 102,
   "item": "banana",
   "price": 0.25,
   "quantity": 50,
   "date": ISODate("2022-01-02T00:00:00Z")
},
{
   "_id": 3,
   "customer_id": 101,
   "item": "orange",
   "price": 0.75,
   "quantity": 75,
   "date": ISODate("2022-01-03T00:00:00Z")
}
What is the aggregation pipeline to group the documents by "customer_id" and calculate the sum of the "quantity" field for each group, sorted in descending order by the sum of the "quantity" field?


Answer: D
Question 5

What is the best practice in using the $match operator?


Answer: D
Page:    1 / 83      
Total 411 Questions | Updated On: Nov 24, 2025
Add To Cart

© Copyrights DumpsCertify 2025. All Rights Reserved

We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the DumpsCertify.