"errmsg" : "A pipeline stage specification object must contain exactly one field.",
// true
db.audiofiles.aggregate([
{
"$match": {
"privacy": { "$ne": "same" },
"date": { "$eq": "2017/04/25" },
"deleted": 0
}
},
{
"$group": {
"_id": "$to_email",
"count": { "$sum": 1 }
}
}
]);
// false
db.audiofiles.aggregate([{
"$match": {
"privacy": { "$ne": "same" },
"date": { "$eq": "2017/04/25" },
"deleted": 0
},
"$group": {
"_id": "$to_email",
"count": { "$sum": 1 }
}
}]);