0
| 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

Strawberry
  • 33,750
  • 13
  • 40
  • 57
Bobby S
  • 4,006
  • 9
  • 42
  • 61

0 Answers0