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
If a variable contains only numbers, can it be a character data type?
How do you define proc in sas? : sas-grid-administration
In sas admin differentiate between roles and capabilities? : sas-grid-administration
what are 5 ways to perform a table lookup in sas? : Sas-administrator
Hi Friends, Am Priya,new to your forum. am looking for Interview questions on SAS Platform Administration. I searched everywhere but I couldn't find them,please can anyone help me with complete interview questions normally everyone will face in the interviews on SAS Administration. am really facing problems in the interviews,am not able to answer any of their questions. I would really appreciate all your help if you can email the complete Interview Questions to priyafeb84@gmail.com Kindly awaiting for your reply with eager
This entry was posted in General. Bookmark the permalink. Post a comment or leave
How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data?
Differentiate between sas functions and sas procedures.
How do you add a number to a macro variable? : sas-macro
What are the features of SAS?
What versions of SAS have you used (on which platforms)?
Of all your work, where have you been the most successful?
What system options would you use to help debug a macro? : sas-macro
What does the trace option do?
How do you connect the desktop application to metadata server? : sas-grid-administration