1.

________ calculates aggregate values for the data in a collection.(a) db.collection.aggregate(b) db.collection.agg(c) db.collection.pipeline(d) all of the mentionedThe question was asked in homework.My doubt stems from Aggregation Pipeline in portion Aggregation Concepts and Aggregation Mechanics of MongoDB

Answer»

The correct choice is (a) db.collection.aggregate

Easiest 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.



Discussion

No Comment Found

Related InterviewSolutions