select top 1 a.bianhao,a.bianhao-max(b.bianhao)
from t a inner join (
select bianhao
from t
where bianhao not in (select bianhao from t where jine>100)
) b on a.bianhao>b.bianhao
where a.jine>100
group by a.bianhao
order by 2 desc
select top 1 a.bianhao,a.bianhao-max(b.bianhao)
from t a inner join t b on (a.bianhao>b.bianhao and a.jine>=100 and b.jine<100)
group by a.bianhao
order by 2 desc