buechermarktHelpers/gesamtgewinn.js
2018-05-29 15:17:24 +02:00

1 line
123 B
JavaScript

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