Answer the question
In order to leave comments, you need to log in
How to get the sum of records for each user in mongo?
there is a list of user id = ['63106487-78af-3487-91da-92f380e56e96','ee6bb121-8d63-3c8b-94a0-e917e329f838'
]
{
"_id": {"$oid": "5f997b922b9f7cc20b223116"},
"created_at": {"$date": "2020-10-29T11:31:32.915Z"},
"output_payload": {
"user_id": {"$binary": 63106487-78af-3487-91da-92f380e56e96}
}
},
{
"_id": {"$oid": "5f997b922b9f7cc20b223117"},
"created_at": {"$date": "2020-10-29T11:31:32.919Z"},
"output_payload": {
"expert_id": {"$binary": ee6bb121-8d63-3c8b-94a0-e917e329f838}
}
},
{
"_id": {"$oid": "5f997b922b9f7cc20b223118"},
"created_at": {"$date": "2020-10-29T11:31:32.923Z"},
"output_payload": {
"user_id": {"$binary": ee6bb121-8d63-3c8b-94a0-e917e329f838}
}
}
Answer the question
In order to leave comments, you need to log in
Use aggregation
https://docs.mongodb.com/manual/reference/operator...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question