完全不明白
db.users.aggregate(
[
{
$group : {
_id: { $sum: 1 }
}
}
]
)
Error: Printing Stack Trace
at printStackTrace (src/mongo/shell/utils.js:37:15)
at DBCollection.aggregate (src/mongo/shell/collection.js:897:9)
at (shell):1:10
Fri Sep 19 18:51:23.623 aggregate failed: {
"errmsg" : "exception: invalid operator '$sum'",
"code" : 15999,
"ok" : 0
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
人生最曼妙的风景,竟是内心的淡定与从容!