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
what is star schema? : Sas-di
What is the work of tranwrd function?
what is scheduling and how will u implement it. In scheduling 5 jobs r running if there is an error occured at 3rd job and how will u check and waht necessary steps will u take not to repeat the same mistake
Explain by-group processing?
What is the use of function Proc summary?
What do you understand by the term Normal Distribution?
How substr function works in sas?
Have you ever used the SAS Debugger?
what is function of retain statment
Explain what Proc glm does?
What are pdv and it functions?
What is the maximum and minimum length of macro variable
How to include or exclude specific variables in a data set?
How do you convert basic cube to transaction cube and transaction cube to basic cube?
Give some examples where proc report’s defaults are same as proc print’s defaults?