Posted by: Pdfprep
Post Date: February 13, 2021
What does the output x of the following MongoDB aggregation query result into; db.posts.aggregate( [ { $group: { _id; "$author", x: { $sum: $likes } } } ] )
A . Average of likes on all the posts of an author, grouped by author
B . Number of posts by an author
C . Sum of likes on all the posts by all the authors
D . Sum of likes on all the posts by an author, grouped by author
Answer: D
Leave a Reply