【发布时间】:2015-10-09 07:37:05
【问题描述】:
是否可以将此 mongo shell 聚合查询转换为 spring-data?
db.getCollection("X").aggregate([
{
$group: {
_id: {
year: {
$year: "$happenedAt"
},
month: {
$month: "$happenedAt"
},
day: {
$dayOfMonth: "$happenedAt"
}
},
count: {
$sum: 1
}
}
}
])
谢谢
【问题讨论】: