create table tb(col1 varchar(10),col2 int,col3 int,col4 int,col5 varchar(10),col6 varchar(10))
insert into tb select 'Y',10,5,123,'A','你好'
insert into tb select 'C',15,6,231,'A','你好啊'
insert into tb select 'C',15,5,321,'A','你好吗'
insert into tb select 'F',20,8,111,'A','你真的好'
select * from tb t where not exists(
select 1 from tb where col1=t.col1 and col3>t.col3
)
insert into tb select 'Y',10,5,123,'A','你好'
insert into tb select 'C',15,6,231,'A','你好啊'
insert into tb select 'C',15,5,321,'A','你好吗'
insert into tb select 'F',20,8,111,'A','你真的好'
select * from tb t where not exists(
select 1 from tb where col1=t.col1 and col3>t.col3
)