我想分组统计数组,然后条件是时间区域,怎么实现
// 报错信息// [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'
}
}
}
])
拉风的咖菲猫
子衿沉夜
慕尼黑8549860
随时随地看视频慕课网APP