I'd like to ask you for help.
I have a MongoDB collection, here's a simplified example.
date | user |
---|---|
2022-09-25 | A |
2022-09-25 | A |
2022-09-25 | B |
2022-09-26 | A |
2022-09-26 | A |
2022-09-27 | A |
2022-09-27 | B |
2022-09-27 | B |
2022-09-27 | B |
And I need to create a query in MongoDB Compass to get the data in the following structure (where each row is one individual document):
date | entries | uniqueUsers |
---|---|---|
2022-09-25 | 3 | 2 |
2022-09-26 | 2 | 1 |
2022-09-27 | 4 | 2 |
Is it possible (and how) to create one pipeline in MongoDB Compass to achieve such a result?
Thank you in advance.