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
Enlist the syntax rules followed in sas statements.
How would you invoke a macro? : sas-macro
Explain what is the use of proc gplot?
explain the proc in sas? : Sas-administrator
Have you ever used the SAS Debugger?
What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro
What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?
what is the difference between nodup and nodupkey options? : Sas programming
Name few SAS functions?
What do you understand by the term Normal Distribution?
Give e an example of..
State the difference between INFORMAT and FORMAT ?
what is the Population you used in your project, is it ITT or PP?
what is slowly changing dimension? : Sas-di
explain the function of substr in sas? : Sas-administrator