SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PaymentModle.aggregate(
  2.                 [
  3.                 {
  4.                     $project: {
  5.                         date: { $dateToString: {date: '$createdAt', format: "%Y-%m-%d"} },
  6.                         expected_paid_amount: "$expected_paid_amount",
  7.                     },
  8.  
  9.                 }, {
  10.                     $group: {
  11.                         _id: "$date",
  12.                         sum: { $sum: '$expected_paid_amount'},
  13.                         count: { $sum: 1 }
  14.                     }    
  15.                 }]
  16.    
  17.             );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top