I have a table which looks like this:
Player | Sport | Rank
A Tennis 1
B Tennis 2
C Tennis 2
D Tennis 2
E Tennis 3
F Soccer 1
G Soccer 2
And so on.
For each partition where Sport is the same, I want to filter the results down so that each Rank for each Sport is unique. In my example above, one of B/C/D would be selected in the result, and I don't care which one is selected.
I expect the result to be (where D could also be B or C):
Player | Sport | Rank
A Tennis 1
D Tennis 2
E Tennis 3
F Soccer 1
G Soccer 2
How can I implement this logic in SQL?