📅  最后修改于: 2022-03-11 14:58:27.997000             🧑  作者: Mango
db.collection.find().sort("age",-1).limit(1) // for MAX
db.collection.find().sort("age", 1).limit(1) // for MIN
db.collection.find().sort("age", pymongo.DESCENDING).limit(1) // for MAX
db.collection.find().sort("age", pymongo.ASCENDING).limit(1) // for MIN