Suposse tou have the following collection with only 2 documents:
If you run an aggregation query and use { $unwind: "$traits" } as the first stage, how many documents will be passed to the next stage of the aggregation pipeline?
Hmm, I think the answer is D) 2. The unwind operation shouldn't create any new documents, it should just flatten the 'traits' array within each of the original 2 documents.
I'm pretty sure the answer is B) 5. The unwind operation should create 5 documents, one for each element in the 'traits' array across the 2 original documents.
The answer is clearly C) 4. The unwind operation will split each document into individual elements of the 'traits' array, so the original 2 documents will become 4 documents.
Joseph
3 days agoEmily
5 days agoGertude
11 days agoAsha
16 days agoElliott
3 days agoParis
21 days ago