Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

MongoDB C100DBA Exam - Topic 5 Question 132 Discussion

Consider that you have a collection called population which has fields state and city. Which of the following query will calculate the population grouped by state and city?
C) db.population.aggregate( [{ $group: { _id: { state: Estate', city: n$city' },pop: { $sum: '$pop' } } }] )
A) db.population.aggregate( [{ $group: { _id: { state: '$state', city; '$city' },pop: { $sum: 1 > > >] )
B) db.population.aggregate( [{ $group: { _id: { state: Estate', city: '$city' },pop: { $pop: 1 } } }] )
D) db.population.aggregate( [{ $group: { _id: { city: '$city' },pop: { $sum: '$pop' } } }] )Multi Document Transaction is not supported by MongoDB

MongoDB C100DBA Exam - Topic 5 Question 132 Discussion

Actual exam question for MongoDB's C100DBA exam
Question #: 132
Topic #: 5
[All C100DBA Questions]

Consider that you have a collection called population which has fields state and city. Which of the following query will calculate the population grouped by state and city?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

0/2000 characters

Currently there are no comments in this discussion, be the first to comment!


Save Cancel