Google News
logo
MongoDB - Quiz(MCQ)
_______ calculates aggregate values for the data in a collection.
A)
db.collection.agg
B)
db.collection.pipeline
C)
db.collection.aggregate
D)
All of the above

Correct Answer :   db.collection.aggregate


Explanation : In the mongo shell, if the cursor returned from the db.collection.aggregate() is not assigned to a variable using the var keyword, then the mongo shell automatically iterates the cursor up to 20 times.

Advertisement