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
how would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable? : Sas programming
what are the softwares and applications that are used most frequently used by sas bi applications developers? : Sas-bi
what cause the "error: connect:" and "error in the libname statement" when there weren't any such problems?
how does sas handle missing values in formats? : Sas programming
What are the limitations for memory allocation for SAS variables
What are the parameters of scan function?
explain what is factor analysis? : Sas-administrator
how we can create a FLAG datasets? Ex:-ID age_group no_persons 1 to 10 10 to 20 3 11 to 20 21 to 30 7 21 to 3o 31 to 40 5
Are you involved in writing the inferential analysis plan? Tables specifications?
what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming
What will calendar procedure do?
If a variable contains letters or special characters, can it be numeric data type?
How would you include common or reuse to be processed along with your statements?
Explain what is SAS informats?
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