I figured out that $facet allow me to do this: db.transactions.aggregate([{ $facet:{ summary: [ {$match:{}}, {$group:{ _id:null, count:{$sum: 1}, ...
確定! 回上一頁