select (select count(distinct b.sal)
from emp b
where b.sal<=a.sal) as rnk,
a.sal
from emp a;
转载于:https://www.cnblogs.com/liang545621/p/7523413.html
select (select count(distinct b.sal)
from emp b
where b.sal<=a.sal) as rnk,
a.sal
from emp a;
转载于:https://www.cnblogs.com/liang545621/p/7523413.html