MongoDB distinct count 2018-09-06 MongoDB, 笔记 MongoDB distinct count1db.xxx.aggregate([{$match:{success:1}},{ $group: {_id:{playerId:"$playerId"}}},{$group:{_id:null,count:{$sum:1}}}])