db.track_visits_y17_m01.aggregate([{
$match: {
"trackingData.gradeId": {
$in: ["12", "15", "16", 12, 15, 16]
},
"created": {
$gte: "2017-01-01 00:00:00",
$lt: "2017-01-23 00:00:00"
}
}
}, {
$group: {
_id: {
year: {
$year: "$created"
},
month: {
$month: "$created"
},
day: {
$dayOfMonth: "$created"
},
},
total: {
$sum: 1
}
}
}])
它会运行但不会返回任何内容。