方法一:

思路:对工资去重,降序

代码:

select distinct salary from salaries where to_date='9999-01-01' order by salary desc

方法二:

思路:用 group By 去重对工资去重,再降序。 group by 去重的性能高于 distinct

代码:

select salary from salaries where to_date='9999-01-01' group by salary order by salary desc;