SAS Adv 12月真题-63题

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 alludes 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 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, computes 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
mbp> processing; however, the smaller is the largest BY group, the 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_Code) 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    where 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
                    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 SASUSER.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.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日考题中选项有改动,但是答案没有变。)
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 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
  ---  ------  -------  ------

本文发布于:2024-09-22 03:56:17,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/505564.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:学院   改动   要求   干部
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议