Hi , I have a data like this data have; input ID Group$ Count; cards; 101 A 180 101 B 90 101 C 60 102 A 90 102 B 60 102 C 50 103 A 60 103 B 50 103 C 70 run; I want this as output: ID Group 101 A 102 B 103 C I want to assign group for id's which has max count. lets take 101 it has max count in group A. so assign A to 101. Now coming to 102 it is also having max count in group A, but A is already assigned to 101 , here i want to assign second highest max count to 102 i.e. B .for 103 it's simple i.e C..... so on.. Thanks..
... View more