不知道这样是不是楼主想要的结果:
data have;
input Cat $ Val;
datalines;
A 1
A 2
C 88
B 3
C 4
C 5
C 6
;
run;
proc sql;
create table wanted(drop=tmp) as
select *,monotonic() as tmp
from have
group by cat
having count(*)=1 or tmp>min(tmp)
order by tmp;
quit;


雷达卡






京公网安备 11010802022788号







