mongoose query max documents result code example
Example: mongoose max record
const maxQuery = Goods.find({}).sort({ price: -1 }).limit(1).then(goods => goods[0].price);
const maxQuery = Goods.find({}).sort({ price: -1 }).limit(1).then(goods => goods[0].price);