mongodb判空做统计的例子
.aggregate([{$match: {shopId:'57297eb73876d9e776d8875d'}}, {$group: {_id: {month: {$cond: [{ $ifNull: ['$reservationDate', 0]},{$month: '$reservationDate'},0]},day: {$cond: [{ $ifNull: ['$reservationD
原创
2016-09-12 15:20:46 ·
949 阅读 ·
0 评论