display Nth highest salary.


SELECT   e1.sal
FROM employee e1
WHERE &N = (SELECT COUNT(DISTINCT (sal) )
            FROM employee e2

            WHERE e1.sal <= e2.sal);

Comments

Popular posts from this blog

ETL TOOLS

RANK FUNCTION