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
Mention what is PROC in SAS?
what is the function of catx syntax? : Sas-administrator
Differentiate between proc means and proc summary.
how do you debug and test your sas programs? : Sas programming
what are the considerations when picking a SAS/STAT procedure?
What are the table names in oracle database...?
how sas deals with business intelligence? : Sas-bi
What are all the problems you faced while validating tables and reports?
What can be the size of largest dataset in SAS?
What does the trace option do?
Are you sensitive to code walk-throughs peer review or QC review?
Explain append procedure?
how to remove duplicates using proc sql?
Of all your work, where have you been the most successful?
What is PDV?