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

ios - Memory not freeing up after popping viewcontroller using ARC -

Java JSoup error fetching URL -

webstorm - PhpStorm file cache conflict with TypeScript compiler -