Last active
April 17, 2023 07:20
-
-
Save djamol/67a6b46a1f4f5dc8755d1054502af0d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"api": "API", | |
"query": [ | |
{ | |
"$match": { | |
"input": "hi" | |
} | |
}, | |
{ | |
"$project": { | |
"myTimestamp": { | |
"$dateToString": { | |
"format": "%Y-%m-%d %H:%M:%S", | |
"date": { | |
"$add": [ | |
{ | |
"$toDate": "$created_at" | |
}, | |
19800000 | |
] | |
}, | |
"timezone": "+05:30" | |
} | |
}, | |
"created_at": 1, | |
"output": 1, | |
"input2": "$input" | |
} | |
} | |
] | |
} |
Author
djamol
commented
Apr 17, 2023
$match: {
date: {
$gte: ISODate("2023-04-16T00:00:00.000Z"),
$lte: ISODate("2023-04-17T00:00:00.000Z")
}
},
{
$group: {
_id: "$user_id",
count: { $sum: 1 }
}
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment