动漫人物
mongodb中实现sql中德group by可以采用聚合函数aggregate参考代码:/*** select avg(pop) avgCitypop from zipsController group by state*/exports.avgGroupByStateCityDemo2Async = function (opts) {var results = {error_code: -1, error_msg: "error"};var pipeline =[{$group: {_id: "$state",avgCitypop: {$avg: "$pop"}}}];return opts.dbs.csdb.collection("zipsController").aggregateAsync(pipeline)