Aggregate query examples useful for work and learning
Aggregation is used to perform complex data search operations in the mongo query which can't be done in normal "find" query.
Create some dummy data:
Examples by topic:
1. Match: Used to match documents (like SQL where clause)
2. Project: Used to populate specific field's value(s)
project stage will include _id field automatically unless you specify to disable