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 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
> 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 stat
ement 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 www./doc/3812458340.html
=(select Names delimited with ','
from WORK.NEWEMPLOYEE
where Salary > 40000);
B. Replace line 104 with:
where www./doc/3812458340.html
=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
adaptiveB. 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?

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