'MongoDB - Find duplicated values
I am fairly new to MongoDB, and here goes my question.
I have a collection containing reviews where each document contains a tour id, a user id, and the review itself. How can I find the tour(s) in which a user has posted more than one review on that tour? (I have attached a snapshot of a review document)
I believe the solution lies in the aggregation but I can't figure out how to achieve it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
