Prova att gruppera efter null.
db.murders.aggregate([{$group: {_id:null, pop: {$avg:"$murders"} } }])
Mer-Info:mongo-average-aggregation-query-with-no-group
Prova att gruppera efter null.
db.murders.aggregate([{$group: {_id:null, pop: {$avg:"$murders"} } }])
Mer-Info:mongo-average-aggregation-query-with-no-group