I need to remove semi duplicate records from the following table
ID PID SCORE
1 1 50
2 33 20
3 1 90
4 5 55
5 7 11
6 22 34
For any duplicate PID's that exist I want to remove the lowest scoring record. In the example above ID 1 would be remove. I'm trying to come up with a way of doing this without using loops but am really struggling.
Any help would be appreciated.
Thanks