Loading

Quipoin Menu

Learn • Practice • Grow

mongodb / Aggregation Pipeline Basics
mcq
Direction: Choose the correct option

Q1.

What is the aggregation pipeline in MongoDB?
A. A backup process
B. A framework for data transformation and analysis
C. A type of join operation
D. A method to combine collections
Direction: Choose the correct option

Q2.

Which method is used to perform aggregation?
A. db.collection.pipeline()
B. db.collection.group()
C. db.collection.aggregate()
D. db.collection.transform()
Direction: Choose the correct option

Q3.

What does the `$match` stage do in an aggregation pipeline?
A. Filters documents to pass only those that match the condition
B. Sorts documents
C. Creates a new field
D. Matches two collections together
Direction: Choose the correct option

Q4.

What is the purpose of the `$group` stage?
A. To group documents by a specified key and perform aggregate functions
B. To project specific fields
C. To limit the number of documents
D. To sort documents
Direction: Choose the correct option

Q5.

Which stage would you use to reshape a document by including, excluding, or adding fields?
A. $set
B. $reshape
C. $addFields
D. $project