我想分組統(tǒng)計(jì)數(shù)組,然后條件是時間區(qū)域,怎么實(shí)現(xiàn)// 報錯信息// [Error] A pipeline stage specification object must contain exactly one field. at line 1, column 1db.getCollection("user_reg").aggregate([
{ "$group": {
_id: "$isfrom",
count: { "$sum": 1
},
}, "$match": { "regtime": { "$gte": '2000-01-01', "$lte": '2020-01-01'
}
}
}
])
MongoDB我想分組統(tǒng)計(jì)數(shù)組,然后條件是時間區(qū)域,怎么實(shí)現(xiàn)
拉風(fēng)的咖菲貓
2019-03-01 20:12:10