sas adv 12月真题-63题

上传人:小** 文档编号:90751932 上传时间:2019-06-16 格式:DOC 页数:36 大小:136.50KB
返回 下载 相关 举报
sas adv 12月真题-63题_第1页
第1页 / 共36页
sas adv 12月真题-63题_第2页
第2页 / 共36页
sas adv 12月真题-63题_第3页
第3页 / 共36页
sas adv 12月真题-63题_第4页
第4页 / 共36页
sas adv 12月真题-63题_第5页
第5页 / 共36页
点击查看更多>>
资源描述

《sas adv 12月真题-63题》由会员分享,可在线阅读,更多相关《sas adv 12月真题-63题(36页珍藏版)》请在金锄头文库上搜索。

1、1. When attempting to minimize memory usage, the most efficient way to do group processing when using the MEANS procedure is to use: A. the BY statement. B. GROUPBY with the NOTSORTED specification. C. the CLASS statement. D. multiple WHERE statements. (The question is pretty clear-cut, IMO. It allu

2、des to the standard long- bearded practical trick used in the situation when MEANS/SUMMARY with CLASS uses too much memory. It does not ask what is more efficient in general (which would be to use something else instead of MEANS if possible), just what leads to the minimal memory footprint, and the

3、answer is A. (Answer B is just a distraction - a common device in computer-adaptive tests). The reason is that without BY, MEANS creates and builds its AVL tree for the entire file and all categorical values crossings found in CLASS. With BY, the proc builds the tree for the current BY group only, c

4、omputes the stats, then erases the tree before the next BY group starts, creates and builds it again, and so on. The erase/create process is not a zero cost one, so the smaller the more numerous the BY groups are, the more it slows does the processing; however, the smaller is the largest BY group, t

5、he smaller is the memory footprint.)2. The SAS data set WORK.CHECK has a variable named Id_Code in it. Which SQL statement would create an index on this variable? A. create index Id_Code on WORK.CHECK; B. create index(Id_Code) on WORK.CHECK; C. make index=Id_Code from WORK.CHECK; D.define index(Id_C

6、ode) in WORK.CHECK; 3. Given the SAS data sets: WORK.EMPLOYEE WORK.NEWEMPLOYEE Name Dept Names Salary - - - - Alan Sales Michelle 50000 Michelle Sales Paresh 60000 A SAS program is submitted and the following is written to the SAS log: 101 proc sql; 102 select dept, name 103 from WORK.EMPLOYEE 104 w

7、here name=(select names from newemployee where salary 40000) ERROR: Subquery evaluated to more than one row. 105 ; 106 quit; What would allow the program to successfully execute without errors? A. Replace the where clause with: where EMPLOYEE.Name=(select Names delimited with , from WORK.NEWEMPLOYEE

8、 where Salary 40000); B. Replace line 104 with: where EMPLOYEE.Name =ANY (select Names separated with , from WORK.NEWEMPLOYEE where Salary 40000); (any表示要有多个值,而=只能要求一个值。) C. Replace the equal sign with the IN operator. D. Qualify the column names with the table names. 4. Given the SAS data set SASUS

9、ER.HIGHWAY: Steering Seatbelt Speed Status Count - - - - - absent No 0-29 serious 31 absent No 0-29 not 1419 absent No 30-49 serious 191 absent no 30-49 not 2004 absent no 50+ serious 216 The following SAS program is submitted: proc sql noprint; select distinct Speed _insert_SQL_clause_ from SASUSER

10、.HIGHWAY ; quit; title1 Speed values represented are: &GROUPS; proc print data=SASUSER.HIGHWAY; run; Which SQL clause stores the text 0-29, 30-49, 50+ in the macro variable GROUPS? A. into &GROUPS B. into :GROUPS C. into :GROUPS separated by , D. into &GROUPS separated by , (2012/11/17日考题中选项有改动,但是答案

11、没有变。)5. The SAS data set WORK.CHECK has an index on the variable Code and the following SAS program is submitted. proc sort data=WORK.CHECK; by Code; run; Which describes the result of submitting the SAS program? A. The index on Code is deleted. B. The index on Code is updated. C. The index on Code

12、is uneffected.D. The sort does not execute. (在于有了index的variable,不能再用by来SORT了。)6. The table WORK.PILOTS contains the following data: WORK.PILOTS Id Name Jobcode Salary - - - - 001 Albert PT1 50000 002 Brenda PT1 70000 003 Carl PT1 60000 004 Donna PT2 80000 005 Edward PT2 90000 006 Flora PT3 100000 The data set was summarized to include average salary based on jobcode: Jobcode Salary Avg - - - PT1 50000 60000 PT1 70000 60000 PT1 60000 60000 PT2 80000 85000 PT2 90000 85000 PT3 100000 100000 Which SQL statement could NOT genera

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 管理学资料

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号