SELECT s.emp_no, s.salary, dense_rank() over (order by s.salary DESC) as rank
FROM salaries s
WHERE s.to_date = '9999-01-01'