How to get the 5th highest value from a table?
Table:tblEmp
Fields Emp_Name,Emp_Salary
Emp_Name Emp_Salary
A 25000
B 35000
C 12000
D 50000
E 14000
F 18000
G 28000
H 50500
I 40000
From this table I want to konw who is getting 5th highest salary?
SELECT ROWNUM NUM_K, K.* FROM (SELECT ROWNUM NUM_M, M.*
FROM ( select A.EMPLID,A.EFFDT
from ( select * from ps_job where emplid = 'FHQ4' ORDER BY EFFDT DESC ) A
WHERE ROWNUM <= Variable ) M
ORDER BY EFFDT ASC ) K
WHERE ROWNUM <=1
Note :Where varaiable is the nth largest u want
Subscribe to:
Post Comments (Atom)
Troubleshooting ACFS-07981: Metadata Validation Errors
Troubleshooting ACFS-07981: Metadata Validation Errors Introduction The ACFS-07981 error indicates that an attempt to run an online file ...
-
Mastering ORA-00054: Resolving the "Resource Busy" Error The ORA-00054 error, often accompanied by the message "resource b...
-
Symptoms When running Create Accounting using SLA with the profile option FA: Use Workflow Account Generation set to Yes at the Site level,...
-
Getting below error in EBS R12.1.3 in Oracle Database SMTP Error. Getting below error while trying to send email in XXXXXXX instance ...
No comments:
Post a Comment