select a.id, a.number, count(distinct b.number) as t_rank
from passing_number as a, passing_number as b
where a.number<=b.number
group by a.id
order by a.number desc,a.id asc;
Hope is a good thing,maybe the best of things,and no good thing ever dies.----------- Andy Dufresne