Posts by Giga byts • 11 points
1 post
-
1
votes1
answer88
viewsA: Rank system using Mongodb
db.collection.aggregate([ { $unwind: "$items" }, { "$group": { "_id": "$_id", collected:{ $addToSet: "$items.results.collected" }, } }, { $unwind: "$collected" }, { $project: { totalcoletado: {…