0
是否可以將此mongo shell聚合查詢轉換爲spring-data?將mongodb聚合查詢轉換爲spring-data-mongodb
db.getCollection("X").aggregate([
{
$group: {
_id: {
year: {
$year: "$happenedAt"
},
month: {
$month: "$happenedAt"
},
day: {
$dayOfMonth: "$happenedAt"
}
},
count: {
$sum: 1
}
}
}
])
感謝