Si son en tres columnas podes ocupar esto:
create table nums (num1 varchar2(2), num2 varchar2(2), num3 varchar2(5))
insert into nums values('01','aa','00001');
insert into nums values('01','aa','00002');
insert into nums values('01','aa','00003');
insert into nums values('01','aa','00150');
insert into nums values('01','cc','00040');
insert into nums values('01','cc','00200');
select num1, num2, min(num3), max(num3) from nums group by num1, num2;
NUM1 NUM2 MIN(NUM3) MAX(NUM3)
------ ------- ------------ --------------
01 cc 00040 00200
01 aa 00001 00150