select b1701,b1703,b1722 from b17
where (b1701,b1703) in
(
select b1701,max(b1703) from b17
group by b1701
);
where (b1701,b1703) in
(
select b1701,max(b1703) from b17
group by b1701
);
调试欢乐多
(select b1722,rank() over(partition by b1703 order by b1701 desc) rk from b17)
where rk=1