db.runCommand( { aggregate: "cities", pipeline: [ {$match : { "days" : { $exists: true} }}, {$limit : 10000 }, {$project : { name : 1, sum : { $add:["$days.4", "$days.4","$days.9"] } }}, { $sort : { sum : -1}},}]);