* 출처 : http://cafe.daum.net/statsas/3F8j/163
1. PROC SQL (최홍규님)
* 출처 : http://cafe.daum.net/statsas/B3m/12944
proc sql;
select max(변수)
from 데이터셋
where 변수 < (select max(변수) from 데이터셋)
;
quit;
2. PROC SQL의 MONOTONIC 함수
data back;
input x;
cards;
3
7
6
8
4
11
5
10
9
;
proc sql;
create table back1(where=(monotonic()=2)) as
select a.*
from back a
order by x desc;
quit;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!