| nid | vid | max_score |
|-----+-----+-----------|
| 1 | 1 | 1 |
|-----+-----+-----------|
| 1 | 2 | 1 |
|-----+-----+-----------|
| 2 | 1 | 1 |
|-----+-----+-----------|
| 2 | 2 | 2 |
-------------------------
I would like to select only the distinct nid, but also only take the row where the vid is the highest.
So the result here would give me
1, 2, 1
2, 2, 2