From Sql query QuestionIn the department where employee have

From Sql query, Question:In the department where employee have the highest average salary, list the top 2 employees who have the highest salaries. (Without using rownum, limit,top functtion)

Solution

SELECT * FROM ( SELECT EMPLOYEE, LAST_NAME, SALARY, RANK() OVER (ORDER BY SALARY DESC) EMPRANK FROM emp ) WHERE emprank <= 2;
From Sql query, Question:In the department where employee have the highest average salary, list the top 2 employees who have the highest salaries. (Without usin

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site