SAS Help, SAS Activity, sas installation, sas certification, sas base preparation, sas interview, sas prep guide, sas tutorial, SAS/BASE, SAS/MACROS,SAS/SQL, PROC SQL, Macros, SAS/STAT, SAS/BI, SAS/DI, sas, Enterprise Guide, Enterprise Miner, Information Delivery Portal, SAS/ACCESS, SAS/GRAPH, SAS/Warehouse Administrator, SAS GUIDE
★★★★★ #1
Friday, March 2, 2012
Find the nth highest salary
Find the nth highest salary
proc sql; select salary from t e1 where (n-1)=(select count(*) from t where salary > e1.salary ); quit;
Description
In this code at the place of 'n' we can write the number of highest salary we want .
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.