adspace


How to find only %th Highest Sal

Answer Posted / abhishekjaiswal

SELECT A.FIRST_NAME,
       A.SALARY
   FROM EMPLOYEES A
   WHERE 3 = ( SELECT COUNT(*) -- Replace 3 with any value of (N - 1)
               FROM EMPLOYEES B
               WHERE B.SALARY > A.SALARY)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is primary key clustered index?

1028


Can we rollback truncate?

1083


what are aggregate and scalar functions? : Sql dba

1142


Can delete statement be rollbacked?

1065


how to escape special characters in sql statements? : Sql dba

1124


Do we need to rebuild index after truncate?

1154


Can we use distinct and group by together?

1147


what are the advantages of sql ? : Sql dba

1154


how to start mysql server? : Sql dba

1279


what is dbms? : Sql dba

1070


What is the current version of sql?

1106


what is schema? : Sql dba

1163


what is collation? : Sql dba

1242


how many tables will create when we create table, what are they? : Sql dba

1156


what are all the common sql function? : Sql dba

1141