nth Highest salary

Find the Nth highest salary

Solution: Common logic for all database is as...

select t.name,t.salary from employee t
  where N= (
              select count(u.salary) from
                  (select distinct salary from employee ) as u
                  where t.salary<= u.salary
       )

Comments

Popular posts from this blog

Struts 2 : Warning :No configuration found for the specified action: 'Login.action' in namespace: '/'

Upload csv file at Google Cloud Storage using java

Read Images from a xlsx file using Apache POI