How to get second top scorer student from a class- table
having different sections A, B, C & D? each section has same
number of student.

Answer Posted / wkm

proc sort data=table;
by section descending score;
run;

data table2;
retain tot 0;
set table;
by section descending score;

if first.section then tot=1;
tot+1;

if tot=2;
run;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different operating system platforms in which we can use sas? : sas-grid-administration

585


what is the purpose of _error_? : Sas programming

602


How to limit decimal places for variable using proc means?

585


Explain bmdp procedure?

605


How do dates work in sas?

635






what is the difference between unique key and primary key? : Sas-di

588


how does sas handle missing values in a merge? : Sas programming

549


What is the function of output statement in a SAS Program?

606


What do you know about symput and symget?

721


What is the basic syntax of a sas program?

658


how can you put a "trace" in your program? : Sas programming

572


Name and describe few sas character functions that are used for data cleaning in brief.

658


If you use a symput in a data step, when and where can you use the macro variable? : sas-macro

603


for what purpose would you use the retain statement? : Sas programming

575


What does proc print, and proc contents are used for?

607