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
Answer / maddy
proc sql;
select max(score) < (select max(score) from table)
from table;
quit;
Is This Answer Correct ? | 3 Yes | 0 No |
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 |
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 |
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 |
What is Transaction...? And what are Comment, Roll back n Save point..?
How does the internal authentication work in sas? : sas-grid-administration
What is LOGICAL VARIABLES in SAS.And how it can be used..Can anyone support..???
How would you include common or reuse code to be processed along with your statements?
Hello, I have PROC SQLs results group by 3 fields and I use SUM and COUNT functions in SQL. The problem is when I try to display my result with PROC TABULATE. I am getting very big numbers. I believe I make a mistake some where in Tabulate. Here is my Proc Tabulate. PROC TABULATE DATA=OUT04_05 FORMAT=12.; CLASS YR CENTRE VISA / PRELOADFMT EXCLUSIVE; VAR NEWUSER FRAUD TRANSFER AUTUSER REISSUE; TABLE CENTRE ALL, (YR ALL)*VISA, (NEWUSER*F=COMMA12. AUTUSER*F=COMMA12. FRAUD*F=COMMA12. TRANSFER*F=COMMA12. REISSUE*F=COMMA12.) / MISSTEXT={LABEL='0'} PRINTMISS RTS=20; FORMAT VISA VISAFMT.; KEYLABEL SUM = ' ' ALL = 'TOTAL'; LABEL YR = 'DATE YEAR' NEWUSER = 'TOTAL NEW ACCT' TRANSFER = 'TOTAL TRANSFER' FRAUD = 'TOTAL FRAUD TRANSFER' AUTUSER = 'TOTAL AUTH USERS' REISSUE = 'TOTAL REISSUE'; When I code it like : NEWUSER*N*F=COMMA12. AUTUSER*N*F=COMMA12. I get same amount numbers but to find a NEWUSER I use COUNT(*) and to find AUTUSER I use SUM(xxxx) function so both result shouldn’t be the same my problem is in this point. Could you tell me where the problem in code is. How can I display my result? TX.
Do you use PROC REPORT or PROC TABULATE? Which do you prefer? Explain.
How to save the log information in a file for future use
whenever we using the merging through data set merging ,we can get note in log like this "MERGE STATEMENT HAS MORE THAN ONE ONE DATASET BY REPEATED BY VAIABLES" but the output has come in good manner,whenever in in sql(full join) we can get cartion product.so How do overcome this problem in sql?
How do dates work in sas?
what is data governance? : Sas-di
What is the purpose of _character_ and _numeric_?
Explain what is the use of proc gplot?