BookmarkSubscribeRSS Feed

SAS Ceritified Advanced Programmer 덤프 풀이 33-35

Started ‎06-15-2020 by
Modified ‎06-15-2020 by
Views 414

33. Which one of the following SAS programs uses the most amount of memory resources for output buffers?

A. data new (bufsize = 1000 bufno = 5);

set temp;

run;

B. data new (bufsize = 1000 bufno = 2);

set temp;

run;

C. data new (bufsize = 2000 bufno = 3);

set temp;

run;

D. data new (bufsize = 4000 bufno = 1);

set temp;

run;

 

정답 : C

해설 : 최적화 관련된 문제입니다. 메모리 자원을 어떤 코드가 가장 많이 사용할지 묻는 문제인데요. 메모리 사용량은 간단하게 BUFSIZE * BUFNO 입니다. 버퍼 사이즈가 얼마나 되고 그 버퍼 사이즈를 가진 버퍼가 몇 개나 있는지가 메모리 사용량입니다. C문항의 경우2000*3으로 가장 많은 메모리를 차지합니다.  

 

 

 

34. Which one of the following programs contains a syntax error?

A. proc sql;

select product.*, cost.unitcost, sales.quantity

from product p, cost c, sales s

where p.item = c.item and p.item = s.item;

quit;

B. proc sql;

select product.*, cost.unitcost, sales.quantity

from product, cost, sales

where product.item = cost.item and product.item = sales.item;

quit;

C. proc sql;

select p.*, c.unitcost, s.quantity

from product as p, cost as c, sales as s

where p.item = c.item and p.item = s.item;

quit;

D. proc sql;

select p.*, c.unitcost, s.quantity

from product, cost, sales

where product.item = cost.item and product.item = sales.item;

quit;

 

정답 : D

해설 : 문제 구성을 보아하니 Alias 관련된 문제입니다. SQL을 평소에 다뤄 보았던 분들은 쉽게 푸실 것 같습니다. SQL에선 FROM 문에서 조회 테이블에 별명(Alias)을 지어줄 수 있습니다. 테이블이 이름이 길다보니 짧게 요약하자는 건데요. D문항은 Alias 선언도 하지 않고 SELECT에서 Alias를 사용하니 구문 오류가 나오는 겁니다. 참고로 Alias는 TABLE_NAME as "별명" , TABLE_NAME "별명" 이런 식으로 선언할 수 있습니다.

 

 

 

35. Following SAS program is submitted:

data temp (<insert option here>);

infile 'rawdata';

input x $ y z;

run;

RAWDATA is a file reference to an external file that is ordered by the variable X. Which option

specifies how the data in the SAS data set TEMP will be sorted?

A. ORDEREDBY = X

B. GROUPBY = X

C. SORTEDBY = X

D. SORTSYNC = X

정답 : C

해설 : X변수에 대해 정렬된 데이터 셋을 얻고 싶습니다. DATA 문의 옵션은 데이터 생성시에 적용되기 때문에, 추후 SQL문에 대한 최적화에 큰 도움을 줍니다. SQL 쿼리 날릴 때 따로 정렬을 하지 않아도 되기 때문이죠. 정렬은 Sortedby 문 입니다.

Version history
Last update:
‎06-15-2020 04:08 AM
Updated by:
Contributors

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Article Labels
Article Tags