SASInstitute SAS Advanced Programming Exam for SAS 9 (A00-212日本語版) - A00-212日本語 模擬練習


data new (bufnp=4);
set old(bufno=4);
run;

正解: A

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

% macro highway;
proc sql noprint;
select count(distinct status)
into :numgrp
from sasuser.highway;
% let numgrp = &numgrp;
select distinct status
into :group1-:group&numgrp
from sasuser.highway;
quit;
% do i = 1 %to &numgrp;
proc print data = sasuser.highway;
where status = "&&group&i" ;
run;
% end;
% mend;
% highway

正解: D

ONE
REP COST
SMITH 200
SMITH 400
JONES 100
SMITH 600
JONES 100

Proc sql;
Select rep, avg(cost) as AVERAGE
From one
Group by rep
<insert SQL procedure clause here>
quit;


正解: A

正解: D

proc transpose data = one
out = trans
name = new;
by x;
var y;
run;

正解: B

ONE
REP COST
SMITH 200
SMITH 400
JONES 100
SMITH 600
JONES 100
JONES 200
JONES 400
SMITH 800
JONES 100
JONES 300

proc sql;
select rep, avg(cost) as AVERAGE
from one
group by rep
having avg(cost) > (select avg(cost) from one);
quit;

正解: C

正解: C






正解: D




Proc sql;
<insert SQL clause here>
from one;
quit;

正解: C




正解: A

% macro test(var);
proc print data = sasuser.class;
where age > &var;
run;
% mend;

正解: B

ONE
CATEGORY AGE SALARY BONUS
----
M 28 200 .
M 25 100 10
F 18 100 50
F 25 200 10

proc sql;
create table two as
select category, salary + bonus as EARNINGS
from one; quit;

正解: C

proc format lib = sasuser;
value tempc low < 0 = 'BELOW FREEZING'
0 < 5 = 'COLD'
5 < 10 = 'MILD'
10 < 15 = 'WARM'
15 high = 'HOT';
run;

正解: C

SASUSERS.HOUSES
OBS STYLE
1 RANCH
2 SPLIT
3 CONDO
4 TWOSTORY
5 RANCH
6 SPLIT
7 SPLIT

proc sql noprint;
select distinct style
into :styles separated by ' '
from sasuser.houses
order by style;
quit;

正解: A