In MySQL, I would simply go \"SELECT sum(pts) FROM table\" to get the sum of the pts column on the table. However, I am converting this application to MongoDB and cannot fin
Other answers have already given lot many sources. Just giving answer for asked question:
db.YOUR_COLLECTTION.aggregate([ { $group: { _id: null, total: { $sum: "$type" } } } ] )