1 line
123 B
JavaScript
1 line
123 B
JavaScript
db.getCollection('books').aggregate({$match:{$or:[{state:1}, {state:0}]}}, { $group: {_id:null, sum : { $sum: "$price" }}}) |