Free MongoDB C100DEV Exam Questions

Become MongoDB Certified with updated C100DEV exam questions and correct answers

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

What is the correct syntax to insert multiple documents into a MongoDB collection named orders and return the _id values for all inserted documents?


Answer: B
Question 2

How does MongoDB handle sorting on fields that contain missing values (i.e., values that are not present in all documents in the collection)?


Answer: C
Question 3

Consider a MongoDB database managing e-commerce product data. The database has a collection named products with documents containing the fields product_id, category, price, and reviews. Each reviews field is an array of subdocuments with fields user_id, rating, and comment. You are tasked with optimizing a query that retrieves all products within a specific category that have an average rating higher than 4. The query is frequently used, and performance is critical. Which indexing strategy would best optimize this query?


Answer: A
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

Consider a collection named orders with the following documents:
{
   "_id" : ObjectId("5f0a7e80d8c9c7b5a48c49e1"),
   "order_number" : 1001,
   "customer_id" : "CUST-001",
   "order_date" : ISODate("2022-01-01T00:00:00Z"),
   "total_amount" : 199.99
},
{
   "_id" : ObjectId("5f0a7e80d8c9c7b5a48c49e2"),
   "order_number" : 1002,
   "customer_id" : "CUST-002",
   "order_date" : ISODate("2022-02-01T00:00:00Z"),
   "total_amount" : 299.99
},
{
   "_id" : ObjectId("5f0a7e80d8c9c7b5a48c49e3"),
   "order_number" : 1003,
   "customer_id" : "CUST-003",
   "order_date" : ISODate("2022-03-01T00:00:00Z"),
   "total_amount" : 399.99
}
What is the query to create a compound index on the "customer_id" (ascending) and "order_date" (descending) fields in the orders collection?


Answer: C
Page:    1 / 83      
Total 411 Questions | Updated On: Dec 05, 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.