1.常规解法,使用DISTINCT和ORDER BY:

SELECT DISTINCT salary
FROM salaries
WHERE to_date='9999-01-01'
ORDER BY salary DESC

2.也可以使用GROUP BY :
按照salary进行分组

SELECT salary
FROM salaries
WHERE to_date='9999-01-01'
GROUP BY salary
ORDER BY salary DESC