create table test (a varchar2(10),b number,c varchar2(12))
insert into test(a,c) values('a001','2006-1-1');
insert into test values('a001',10,'2006-2-1');
insert into test values('a001',30,'2006-3-1');
insert into test values('a001',20,'2006-4-1');
insert into test(a,c) values('b001','2005-1-1');
insert into test values('b001',30,'2006-2-1');
insert into test values('b001',25.5,'2006-3-1');
insert into test(a,c) values('c001','2007-3-1');
insert into test values('c001',30,'2006-5-1');
insert into test values('c001',15,'2007-2-1');
insert into test values('c001',50,'2007-1-1');
select a.a, b,a.c from test,
(select a,max(c) c from test
where b is not null
group by a) a
where test.a = a.a and test.c = a.c