What is the aggregation pipeline?
Model answer
A pipeline processes documents through stages such as $match (filter), $group (summarise), $sort, $project and $lookup (join). It is used for statistics and reports, like counting jobs per status. Put $match early so indexes help and less data flows through later stages.
Learn this topic
Connect Express to MongoDB with Mongoose in the course MERN Stack Full Course: MongoDB, Express, React and Node.js.
Sign in to add your own answer.