Valid C100DEV Dumps shared by ExamDiscuss.com for Helping Passing C100DEV Exam! ExamDiscuss.com now offer the newest C100DEV exam dumps , the ExamDiscuss.com C100DEV exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com C100DEV dumps with Test Engine here:
Access C100DEV Dumps Premium Version (253 Q&As Dumps, 35%OFF Special Discount Code: freecram )
A collection called players contains the following documents: [ { _id: 1, user: 'Tom', scores: [ 23, 56, 3, 52, 62 ], bonus: 5 }, { _id: 2, user: 'Jane', scores: [ 42, 50, 10 ], bonus: 3 } ] You want to add additional fields to each document: -> total_score (sum of the scores Array) -> avg_score (average score in scores Array) -> total_score_with_bonus (total_score + bonus) Expected output: [ { _id: 1, user: 'Tom', scores: [ 23, 56, 3, 52, 62 ], bonus: 5, total_score: 196, avg_score: 39.2, total_score_with_bonus: 201 }, { _id: 2, user: 'Jane', scores: [ 42, 50, 10 ], bonus: 3, total_score: 102, avg_score: 34, total_score_with_bonus: 105 } ] Which query do you need to use?
Correct Answer: A
https://docs.mongodb.com/manual/reference/method/db.collection.aggregate/ https://docs.mongodb.com/manual/reference/operator/aggregation/addFields/