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);
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
--- ------ ------- ------