Which of the following scenarios is best suited for applying the Attribute Pattern?
Answer: D
Question 2
Consider a MongoDB database containing a collection of documents representing online orders for an e-commerce website. The documents have the following structure:
Select an aggregation pipeline that returns the total sales amount by state and month, for orders placed in the year 2022. The result should have the following format:
Answer: A
Question 3
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 4
How can we present the basic syntax for aggregation in MongoDB?
Answer: D
Question 5
You have a MongoDB collection named students, where each document represents a student. The documents include fields like name, age, and courses. The courses field is an array that lists the course codes each student is enrolled in. You want to find all students enrolled in the course with the code "CS101". Which query will correctly retrieve all students enrolled in "CS101"?