Добавил выборку по дате
.aggregate(
[
{$match: {$and: [{ Date: { $gte: 1556799231792 } }, { Date: { $lte: 1556799231793 } }]}},
{
$facet: {
"oneCategory": [{
$group: {
_id: "$oneCategory",
count: {$sum: "$Count"}
}
}],
"twoCategory": [
{$match: {oneCategory: "Тарелки"}},
{
$group: {
_id: {twoCategory: "$twoCategory"},
count: {$sum: "$Count"}
}
}],
"threeCategory": [
{$match: {$and: [{oneCategory: "Тарелки"}, {twoCategory: "Желтые"}]}},
{
$group: {
_id: "$threeCategory",
count: {$sum: "$Count"}
}
}],
"fourCategory": [
{$match: {$and: [{oneCategory: "Тарелки"}, {twoCategory: "Желтые "}, {threeCategory: "С рисунком"}]}},
{
$group: {
_id: "$fourCategory",
count: {$sum: "$Count"}
}
}],
"fiveCategory": [
{$match: {$and: [{oneCategory: "Тарелки"}, {twoCategory: "Желтые "}, {threeCategory: "С рисунком"}, {fourCategory: "Круглые"}]}},
{
$group: {
_id: "$fiveCategory",
count: {$sum: "$Count"}
}
}]
}
}
]
)