0
如何只显示count> 10的结果?MongoDB与总和和最小阈值的聚合
db.mydate.aggregate(
[
{
$group : {
_id : "Ident.url",
count: { $sum: 1 }
}
}
]
)
谢谢!
如何只显示count> 10的结果?MongoDB与总和和最小阈值的聚合
db.mydate.aggregate(
[
{
$group : {
_id : "Ident.url",
count: { $sum: 1 }
}
}
]
)
谢谢!
后$匹配滤波器match
试图筛选计数:
db.mydate.aggregate(
[
{
$group : {
_id : "Ident.url",
count: { $sum: 1 }
}
},
{
$match : {
count: {
$gt: 10
}
}
}
]
)
你可以组
db.mydate.aggregate(
[
{
$group : {
_id : "Ident.url",
count: { $sum: 1 }
}
},
{$match: {count: {$gt:10}}}
]
)
像'{$比赛:{数:{$ GT:10}} }' – Veeram