I would like to remove duplicates from a dataset which has 3 columns
A 0 3238
B 0 3367
C 0 3130
D 1 3130
I need to remove lines which contain duplicate values in the third column, but preferentially keeping those with the value '1' in the second column. I know how to remove duplicates using awk, but I can't work out how to add in the conditional statment.
Thanks