Conventional Query:
select
department_id,
last_name,
salary
from employees e
where 1 = (select count(distinct salary)
from employees e2
where e2.salary > e.salary and e2.department_id = e.department_id)
order by department_id;
No comments:
Post a Comment