我在mongodb文档中找到了这个mongo命令:db.sales.aggregate([{$group:{_id:{month:{$month:"$date"},day:{$dayOfMonth:"$date"},year:{$year:"$date"}},totalPrice:{$sum:{$multiply:["$price","$quantity"]}},averageQuantity:{$avg:"$quantity"},count:{$sum:1}}}])当使用springdata的Aggregation时,很容易通过调用Aggregation.group(Feild...