In a shcool there are 1000 students. After completion of
every test in 6 subjects , each subject teacher submit the
marks of every student at different times and loaded in the
database commonly. How will you seperate the top two
subject marks for each each studet using SAS?
Answer Posted / basha
just i imagine data in data base is;
like below output dataset:
data rating;
input name $ a b c d e f;
cards;
raj 1 54 21 5 7 2
jar 2 21 54 67 3 5
;
answer:
proc sort data=rating;
by name;
run;
proc transpose data=rating out=marks(rename=(col1=marks
_name_=subjects) drop=_label_);
by name;
run;
proc sort data=marks;
by descending marks name;
run;
data jj;
set marks;
by name;
if first.name then ind=0;
ind+1;
run;
proc print;
where ind in(1,2);
run;
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
Why and when do you use proc sql?
How to include or exclude specific variables in a data set?
Differentiate between sas functions and sas procedures.
How to create an external dataset with sas code?
How are numeric and character missing values represented internally?
What are the functions which are used for character handling functions?
Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??
Name validation tools used in SAS
what is sas olap server? : Sas-di
What does the RUN statement do?
what is the use of sas management console? : Sas-di
i want for interview question & answer plz it need immediate send t my mail raviprakashmot@gmal.cm
Differentiate between ceil and floor functions.
Intern stastical programmer written test
Explain append procedure?