Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db.user.aggregate(
- {
- "$match": { 'phoneInfo.verifiedFlag': true}
- },
- {
- "$project": {
- yearMonthDayUTC: { $dateToString: { format: "%Y-%m-%d", date: "$createdOn" } }
- }
- },
- {
- "$group": {
- "_id": {day: "$yearMonthDayUTC"},
- count: {
- "$sum": 1
- }
- }
- },
- {
- $sort: {
- "_id.day": 1,
- }
- })
Add Comment
Please, Sign In to add comment