I want to find the top N entries for a certain field based on the values of another field.
For example if N=3, we want the 3 best values for each entry:
Entry1 ||| 100
Entry1 ||| 95
Entry1 ||| 30
Entry1 ||| 80
Entry1 ||| 50
Entry2 ||| 40
Entry2 ||| 20
Entry2 ||| 10
Entry2 ||| 50
Entry2 ||| 30
would return
Entry1 ||| 100
Entry1 ||| 95
Entry1 ||| 80
Entry2 ||| 40
Entry2 ||| 50
Entry2 ||| 30