Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PaymentModle.aggregate(
- [
- {
- $project: {
- date: { $dateToString: {date: '$createdAt', format: "%Y-%m-%d"} },
- expected_paid_amount: "$expected_paid_amount",
- },
- }, {
- $group: {
- _id: "$date",
- sum: { $sum: '$expected_paid_amount'},
- count: { $sum: 1 }
- }
- }]
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement