I'm sure this is super-easy, I just haven't drunk enough coffee today....
So, I have a single table with a few columns, like:
NAME1 val1 val2 val2
NAME2 val1 val2 val3
There are only about 20 distinct names the first column holds, the values are real but duplicates happen sometimes. I have to find the best ranking row for each distinct NAME. The ranking is done by sorting first by val1 then val2 then val3
Edit: So here is an example:
Ben 2.1 1.0 0.6
Ben 0.1 1.0 0.6
Ben 2.1 0.9 0.1
Alice 2.1 0.9 0.1
Alice 2.0 0.9 0.1
The answer should be:
Ben 2.1 1.0 0.6
Alice 2.1 0.9 0.1