logo

Crowdly

Browser

Add to Chrome

You have 100 documents in events collection, each containing an array attendees ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

You have 100 documents in events collection, each containing an array attendees of 50 elements. 20 of those documents have at least one attendee with "VIP": true. Consider two approaches to count total "VIP" attendees across all events:

Approach A: $unwind the attendees array, then $match "VIP": true.

Approach B: $match documents where at least one attendee is VIP, then $unwind attendees, then $match "VIP": true.

How many documents will be output by the $unwind stage in Approach B?

0%
0%
100%
0%
More questions like this

Want instant access to all verified answers on learning.monash.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome