直接对C取最大就行了
select a,b,max(c) c
from T
group by a,b