05-10-2017 11:24 AM
I have several columns: station year a b c d e f g ....
And I want to sum a,b,c,d,e,f,g,... by year.
DO I need to use macro or sql? And how to do it?
I would greatly appreciate it if any one can have any ideas!
Thanks a lot!
05-10-2017 12:25 PM - edited 05-10-2017 12:26 PM
Use PROC SUMMARY.
proc summary data=have nway ; by station year; var a b c d e f g ....; output out=want sum= ; run;