user2197334
user2197334

Reputation: 11

mongodb nested query

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?

Upvotes: 0

Views: 199

Answers (1)

Igor Chubin
Igor Chubin

Reputation: 64613

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

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

Upvotes: 1

Related Questions