标签:
mongoDB 聚合
group
db.person.group({ "key":{"age":true}, "initial":{"person":[]}, "$reduce":function(cur,prev){ prev.person.push(cur.name); },"finalize":function(out){out.count=out.person.length;},"condition":{"age":{$lt:25}} })
标签:
原文地址:http://www.cnblogs.com/lixigang/p/4836374.html