select distinct a, b from tb
-- or
select *
from tb tb_a
where not exists (
select 1
from tb tb_b
where tb_a.a = tb_b.a
and tb_a.b = tb_b.b
and tb_a.c < tb_b.c
)
select A, B, C
FROM tab t1
WHERE Not exists(select 1 from tab where t1.A = A and t1.B= B and c > t1.c)
select * from TableName tn where A=(select top 1 from TableName tn1 where tn1.A=tn.A) and b=(select top 1 from TableName tn1 where tn1.b=tn.b)