类似的写法:select t1.* from table1 t1
where not exists(
select 1 from table1 t2
where t2.columnA=t1.columnA and t2.columnC<t1.columnC
having count(*)>0
)
where not exists(
select 1 from table1 t2
where t2.columnA=t1.columnA and t2.columnC<t1.columnC
having count(*)>0
)
请帮帮忙
假设这里id是:select t1.* from table1 t1
where not exists(
select 1 from table1 t2
where t2.Time=t1.Time and t2.id<t1.id
having count(*)>0
)