title: Group by returns only the first matching document in mongodb using pymongo, How to retrieve all the matching documents?
body: <p>I am currently using the first operator. Is there any operator to fetch all the documents?</p>
  
  <pre><code>q = col.aggregate([{'$group' : {'_id' : 
   {'DESIGN':"$CURRENT_DESIGNATION","count":{"$sum":1}},
                  "NAME":{"$first":"$NAME"},
                  "CURRENT_LOCATION":{"$first":"$CURRENT_LOCATION"},
                  "CURRENT_DESIGNATION": 
   {"$first":"$CURRENT_DESIGNATION"},
                  "PROFILE_URL":{"$first":"$PROFILE_URL"}}}])
  
  
  
  for i in q:
      pprint(i)
  </code></pre>