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

Read Images from a xlsx file using Apache POI

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

How to create mail message in FRC822 format