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