Database
[{"subdocument":{"value":100,"additionalValue":300}},{"subdocument":{"value":100}}/** additionalValue doesn't exist on this one*/]
Query
db.collection.aggregate([{$group:{_id:null,largest:{$max:{$max:["$subdocument.value","$subdocument.additionalValue"]}},smallest:{$min:{$min:["$subdocument.value","$subdocument.additionalValue"]}},average:{$avg:{$avg:["$subdocument.value","$subdocument.additionalValue"]}}}},{"$lookup":{"from":"collection","let":{l:"$largest"},"pipeline":[{$match:{$expr:{$eq:["$$l",{$max:["$subdocument.value","$subdocument.additionalValue"]}]}}}],"as":"largestItems"}},{"$lookup":{"from":"collection","let":{s:"$smallest"},"pipeline":[{$match:{$expr:{$eq:["$$s",{$min:["$subdocument.value","$subdocument.additionalValue"]}]}}}],"as":"smallestItems"}}])