id visit result newvalue
01 1 30 .
01 2 25 30
01 3 45 25
01 4 14 25
01 5 5 14
02 1 29 .
02 2 13 29
02 3 23 13
02 4 34 13
02 5 7 13

creat the first three variable then min value creat newvalue then show upcase