22,209
社区成员
发帖
与我相关
我的任务
分享
select * from @T a
where col3 in(select MIN(col3) from @T group by col1,col2)
select * from tbl1 a
where not exists (
select 1 from tbl1
where col1=a.col1
and col2=a.col2
and col3<a.col3
)
select * from tbl1 a
where not exists(select 1 from tal1 where col1=a.col1 and col2=a.col2 and col3<a.col3)