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
Explain proc univariate?
Have you ever used the SAS Debugger?
What is the work of tranwrd function?
What is the use of divide function?
how can you create zero observation dataset? : Sas programming
Explain the difference between using drop = data set option in set and data statement?
What do you know about sas data set?
what is null hypothesis? why do you consider that?
What do the mod and int function do? : Sas programming
what are the types of interactive display types? : Sas-bi
explain what is factor analysis? : Sas-administrator
what is hash files in sas and why we are using this one in sas?
explain the use of % includes a statement in sas? : Sas-administrator
Explain bmdp procedure?
what is sas business intelligence? : Sas-bi