|
create table tt
(
aa int,
bb int,
cc varchar(08)
)
insert into tt
select 1, 255, '20161212' union
select 1, 15, '20161210' union
select 2, 33, '20160612' union
select 2, 11, '20160101'
select a.*
from tt a
where not exists
(select 1 from tt where aa = a.aa and cc> a.cc) |
|