MongoDB, Part 2: The Aggregation Pipeline, Stage by Stage
Part 2 of my MongoDB learning series: how the aggregation pipeline reshapes documents stage by stage — $unwind, $group, $lookup — plus the type-mismatch bug that silently joins nothing and why stage order is a cost decision.