ankur gupta


{ City }
< Country > india
* Profession *
User No # 46207
Total Questions Posted # 0
Total Answers Posted # 1

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 1
Users Marked my Answers as Wrong # 1
Questions / { ankur gupta }
Questions Answers Category Views Company eMail




Answers / { ankur gupta }

Question { 6339 }

find highest salary


Answer

FOR Nth Highest Salary Where N= 1,2,3,4

SELECT * FROM EMP E1 WHERE N=(SELECT COUNT(DISTINCT SAL)
FROM EMP E2 WHERE E1.SAL <= E2.SAL)


I have tested This Query on MySQL 5.1.41. its working fine.

Is This Answer Correct ?    1 Yes 1 No