Tag: data structures
-
Aggregate function – using $project and $group
If you want the aggregated data to be stored in a specific column format then use $project. Here is an example:- The aggregated data structure will be as shown below in database:-