Database
db={"cars":[{"cost":1},{"cost":2},{"cost":3}],"boats":[{"cost":4},{"cost":5},{"cost":6}],"bikes":[{"cost":7},{"cost":8},{"cost":9}]}
Query
db.cars.aggregate([{"$group":{"_id":null,"avg-cost":{"$avg":"$cost"}}},{"$project":{"_id":0,"avg-cost":1,"Type":"car"}},{"$unionWith":{"coll":"boats","pipeline":[{"$group":{"_id":null,"avg-cost":{"$avg":"$cost"}}},{"$project":{"_id":0,"avg-cost":1,"Type":"boat"}}]}},{"$unionWith":{"coll":"bikes","pipeline":[{"$group":{"_id":null,"avg-cost":{"$avg":"$cost"}}},{"$project":{"_id":0,"avg-cost":1,"Type":"bike"}}]}}])