how to get second highest salary from a employee table and
how get a 5th highest salary from a employee table?
Answer Posted / dinesh
select * from emp e where
2 =(select count(distinct sal) from emp where e.sal<=sal)
or 5=(select count(distinct sal) from emp where e.sal<=sal);
Is This Answer Correct ? | 9 Yes | 5 No |
Post New Answer View All Answers
What are the different types of sas functions?
What is the difference between INPUT and INFILE ?
what is data access? : Sas-di
what are the softwares and applications that are used most frequently used by sas bi applications developers? : Sas-bi
Explain the difference between using drop = data set option in set and data statement?
how does sas handle missing values in functions? : Sas programming
What is your favorite all time computer book? Why?
how can you import .csv file in to sas? : Sas programming
how sas deals with business intelligence? : Sas-bi
what is function of retain statment
how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?
what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming
what is the difference between floor and ceil functions in sas? : Sas-administrator
What is by-group processing?
what is metadata? : Sas-bi