db.test.aggregate([{$project:{Hour:{$hour:"$createTime"},teacherId:1,createTime:1,updateScore:1,remark:1}},{$match:{updateScore:20,remark:/测试/,Hour:12}},{$group: {_id:{"teacherId":"$teacherId"},sum: {$sum: "$updateScore"}}}])