nerdexam
MongoDB

C100DBA · Question #70

What does the output x of the following MongoDB aggregation query result into; db.posts.aggregate( [ { $group: { _id; "$author", x: { $sum: $likes } } } ] )

Sign in or unlock C100DBA to reveal the answer and full explanation for question #70. The question stem and answer options stay visible for context.

MongoDB Fundamentals

Question

What does the output x of the following MongoDB aggregation query result into; db.posts.aggregate( [ { $group: { _id; "$author", x: { $sum: $likes } } } ] )

Options

  • AAverage of likes on all the posts of an author, grouped by author
  • BNumber of posts by an author
  • CSum of likes on all the posts by all the authors
  • DSum of likes on all the posts by an author, grouped by author

Unlock C100DBA to see the answer

You've previewed enough free C100DBA questions. Unlock C100DBA for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#aggregation#$group#$sum#accumulator operators
Full C100DBA Practice