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

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