Advertisement
BoberDiversant

Untitled

Dec 24th, 2019
418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. db.getCollection('callTask').aggregate(
  2.     {
  3.         $match: {
  4.             campaign : {$in :["5e0097e91755e0b8c4aaacca","5e0097ff1755e0b8c4ab407b","5e00980e1755e0b8c4aba4b3","5e0098191755e0b8c4abeed1",
  5.                 "5e0098e31755e0b8c4b13e89","5e0098ef1755e0b8c4b18b74","5e0098f91755e0b8c4b1d342","5e0099051755e0b8c4b223f1","5e0099111755e0b8c4b272e9",
  6.                 "5e00991b1755e0b8c4b2beee","5e0099251755e0b8c4b30110"]}
  7.             },
  8.     },
  9.     {
  10.         $group : {_id:"$state", total : {$sum:1}}
  11.     }
  12. );
  13.  
  14. db.getCollection('callTask').aggregate(
  15.     {
  16.     $match : {
  17.             state : "FAILED",
  18.             campaign : {$in :["5e0097e91755e0b8c4aaacca","5e0097ff1755e0b8c4ab407b","5e00980e1755e0b8c4aba4b3","5e0098191755e0b8c4abeed1",
  19.                 "5e0098e31755e0b8c4b13e89","5e0098ef1755e0b8c4b18b74","5e0098f91755e0b8c4b1d342","5e0099051755e0b8c4b223f1","5e0099111755e0b8c4b272e9",
  20.                 "5e00991b1755e0b8c4b2beee","5e0099251755e0b8c4b30110"]}
  21.             }
  22.     },
  23.     {
  24.     $group : {_id : "$failComment", total : { $sum : 1 }}
  25.     }
  26.   );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement