11.9 给结果分等级

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/l10n/p/7523413.html