Mongo Playground

Configuration

[{"engineHour":25971},{"engineHour":27031},{"engineHour":27598},{"engineHour":25248},{"engineHour":25311},{"engineHour":25429},{"engineHour":25610},{"engineHour":25790},]

Query

db.collection.aggregate([{"$sort":{"engineHour":1}},{"$group":{"_id":null,"docs":{"$push":"$$CURRENT"}}},{"$project":{"max":{"$arrayElemAt":["$docs",-1]},"min":{"$arrayElemAt":["$docs",0]}}}])

Result