I have a data as follows:
> db.PQRCorp.find().pretty() { \"_id\" : 0, \"name\" : \"Ancy\", \"results\" : [ { \"eva
You do not need to use $unwind and $group here... A simple $project query can $sum your entire score...
$unwind
$group
$project
$sum
db.PQRCorp.aggregate([ { "$project": { "name": 1, "totalTermScore": { "$sum": "$results.score" } }} ])