MongoDb Aggregate Total Count Before Grouping
I have an aggregation pipeline that groups objects and holds count for some specific field for grouped objects. You can reproduce the problem here: https://mongoplayground.net/p/2DGaiQDYDBP . The schema is like this; [ { "_id": { "$oid": "63ce93ffb6e06322db59fdc0" }, "fruit": "apple",…