Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumMongoDB$lookup joinsSingle-choice MCQ

What does this $lookup produce when a local document has no matching foreign documents, and how does that interact with a subsequent $unwind?

db.orders.aggregate([ { $lookup: { from: "items", localField: "_id", foreignField: "orderId", as: "items" } }, { $unwind: "$items" } ])