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

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -