Answer the question
In order to leave comments, you need to log in
Help with grouping and summing query in MongoDB?
There is a database structure of this type (statistics of sent and received e-mails):
{ from: "[email protected]", to: "[email protected]", date: new Date() }
{ from: "test @test.com", to: "[email protected]", date: new Date() }
{ from: "[email protected]", to: "[email protected]", date: new Date() }
how to make a request so that the output is in the form:
<e-mail> - <how much sent> - <how much received>
Answer the question
In order to leave comments, you need to log in
Have you already looked here?
docs.mongodb.org/manual/core/aggregation-introduction
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question