0

this is the structure of my table

[
 "_id" : 
 "rating" : ,
 "user_id" :
 "review_id" : 
 "user_url" : 
 "content" : ,
 "review_date" : 
 "bus_url" : 
 "type" : ,
 "categories" : [

 ]

How would I count the number of user_ids who occur more than once. How would I do this?

1 Answer 1

1

You need to use $group operator, more on it:

http://docs.mongodb.org/manual/reference/aggregation/group/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.