connections_tbl
point1 point2 medium
ktm pkr air
pkr ktm road
pkr baglung road
baglung palpa road
ktm brt air
brt ktm road
baglung pkr train
required output
point1 point2 medium
ktm pkr air
pkr baglung train
baglung palpa road
ktm brt air
My problem is similar to this question.I want to do is create a list of unique rows based on the value of medium, with priority to air,train and road if all medium records exist for the same points. Note:Priority order is air>train>road.