- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 05-10-2017 11:24 AM
(1371 views)
Hello All,
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!
6 REPLIES 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
SQL
MEANS/SUMMARY
MEANS/SUMMARY
Data never sleeps
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Do you know how to do sql?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Use PROC SUMMARY.
proc summary data=have nway ;
by station year;
var a b c d e f g ....;
output out=want sum= ;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks you!
output out=want sum=a_sum b_sum c_sum ... ;
Is this correct? Will this give me the corresponding sum for all the variables?
output out=want sum=a_sum b_sum c_sum ... ;
Is this correct? Will this give me the corresponding sum for all the variables?