calculate the sum of value using only DATA STEP.
data count_;
input year name $ value;
cards;
2006 xxx 10
2007 yyy 12
2006 xxx 20
2008 yyy 15
2007 xxx 15
;
out put should be like this
year name T_value
-----------------------
2006 xxx 30
2007 xxx 15
2007 yyy 12
2008 xxx 15
Answer Posted / xxx
here i can write the code using PROC SQL;
plz ans in DATA STEP;
proc sql;
select year,name, sum(value)as T_value from count_ group by
year, name having sum(value) order by name;
quit;
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
describe about physical data integration? : Sas-di
How to sort in descending order?
What is the difference between where and if statement?
Name few SAS functions?
I have 3 years of work experience at a startup and recently got certified in Data Science with SAS. I need to know how to get into the analytics industry
What does P-value signify about the statistical data?
hi all, I need the SAS DI DUMP(A00 260) for attending the certification. if any one have, pls provide it.Please Email to vrpotluri@hotmail.com. Thanks - Ramana
How can I remove header from output data set?
How to limit decimal places for the variable using proc means?
What is the general format of function in sas? : sas-grid-administration
Explain bmdp procedure?
Explain proc sort?
what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming
name some data transformation used in sas di? : Sas-di
How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro