doctrine2 - MongoDB - find ids of documents with the highest value in a group -


assume following collection:

_id:1, humanid:a, value:10 _id:2, humanid:a, value:20 _id:3, humanid:b, value:33 

question:

what easiest way find ids of documents have highest value when grouped humanid, i.e. output [2, 3].

bonus question:

can done using doctrine odm query builder?


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -