What you want to do is use the proc means statement. data have; input COL1$ COL2$ COL3; cards; A X 100 A Y 250 C Z 300 ; run; proc sort data=have; by COL1; run; proc means data=have noprint; by COL1; output sum=COL3 out=want (drop = _type_ _freq_); run; proc print data=want; run; This yields the following, which is close to what you asked for: obs COL1 COL3 1 A 350 2 B 300 If you want it to be exactly what you asked for (below), you can just merge "want" with "have". obs COL1 COL2 COL3 1 A X 350 2 A Y 350 2 B Z 300
... View more