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.

Answers were Sorted based on User's Feedback



How to get second top scorer student from a class- table having different sections A, B, C & D?..

Answer / maddy

proc sql;
select max(score) < (select max(score) from table)

from table;
quit;

Is This Answer Correct ?    3 Yes 0 No

How to get second top scorer student from a class- table having different sections A, B, C & D?..

Answer / partha

proc rank data=emp descending ties=dense out=s(where=(inc=1));
by deptno ;
var sal;
ranks inc;
run;
quit;

Is This Answer Correct ?    1 Yes 0 No

How to get second top scorer student from a class- table having different sections A, B, C & D?..

Answer / 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

How to get second top scorer student from a class- table having different sections A, B, C & D?..

Answer / chandu

DATA ONR;
INPUT
@1 a
@3 b
@5 c
@7 d
;
SUM_VALUE =SUM (A, B, C, D);
RUN;
PROC SORT DATA=ONE NODUPKEY;
BY SUM_VALUE;
RUN;
DATA ONE_RESULT;
SET SUM;
IF _N_ = 2 THEN OUTPUT;
RUN;

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More SAS Interview Questions

What is program data vector (pdv)?

0 Answers  


Tell different ways to create Macrovarible?

3 Answers   Accenture, PharmaNet i3,


Explain the difference between nodup and nodupkey options?

0 Answers  


How can you put a "trace" in your program?

2 Answers   Quintiles,


How can a SAS WEB REPORT STUDIO USER identify which report tabs they have been permitted without entering the SAS WEB REPORT STUDIO

2 Answers   TCS,






What report output formats can you generate using SAS?

3 Answers   Accenture,


what is business intelligence? : Sas-bi

0 Answers  


How would you include common or reuse to be processed along with your statements?

0 Answers  


Differentiate between sas functions and sas procedures.

0 Answers  


what is fact table and factless table?

1 Answers  


Mention sas system options to debug sas macros.

0 Answers  


what is AE onset date and what is RDS?

4 Answers   Accenture,


Categories