Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{"_id":1,"partialAmount":"15.00"},{"_id":2,"partialAmount":"20.00"}]
Query
db.collection.aggregate([{$group:{_id:null,totalAmount:{$sum:{$toDouble:"$partialAmount"}}}}])
Result