------ Chang Lauren
Which SQL set operator completes the program and generates the desired output?
A.
intersect corr
B. except
C. intersect
D.
left except
Item 47 of 63 Mark item for review
The following SAS program is submitted:
%macro execute;
[_insert_statement_here_]
proc print data=SASUSER.HOUSES; run; %end; %mend execute; %execute
Which statement completes the program so that the PROC PRINT step executes on Thursday?
A.
if &sysday = Thursday then %do;
B.
%if &sysday = Thursday %then %do;
C.
%if \
D.
%if &sysday = \
Item 48 of 63 Mark item for review
Given the following program and data:
data WORK.BDAYINFO; infile datalines;
input Name $ Birthday : mmddyy10.; datalines;
Alan 11/15/1950 Barb 08/23/1966 Carl 09/01/1963 ; run;
%let Want=23AUG1966;
proc print data=WORK.BDAYINFO; [_insert_statement_] run;
What is the WHERE statement that successfully completes the PROC PRINT and selects the observation for Barb?
A.
where Birthday=&Want;
B.
where Birthday=\
C.
where Birthday=\
D.
where Birthday='&Want'd;
Item 49 of 63 Mark item for review
Which macro statement would remove the macro variable Mv_Info from the symbol table?
A.
%mdelete &Mv_Info;
B.
%symerase Mv_Info;
C.
%symdel &Mv_Info;
D.
%symdel Mv_Info;
Item 50 of 63 Mark item for review
The table WORK.PILOTS contains the following data:
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
A query was constructed to display the pilot salary means at each level of Jobcode and the difference to
the overall mean salary:
Jobcode Average Difference ------------------------------ PT1 60000 -15000 PT2 85000 10000 PT3 100000 25000
Which select statement could NOT have produced this output?
A. select
Jobcode,
avg(Salary) as Average,
calculated Average - Overall as difference from
WORK.PILOTS,
(select avg(Salary) as Overall from WORK.PILOTS) group by jobcode ;
B. select
Jobcode,
avg(Salary) as Average,
(select avg(Salary) from WORK.PILOTS) as Overall, calculated Average - Overall as Difference from WORK.PILOTS group by 1 ;
C. select
Jobcode, Average,
Average-Overall as Difference from
(select Jobcode, avg(Salary) as Average from WORK.PILOTS group by 1),
(select avg(Salary) as Overall from WORK.PILOTS)
;
D. select
Jobcode,
avg(Salary) as Average,
calculated Average-(select avg(Salary) from WORK.PILOTS) as Difference from WORK.PILOTS group by 1 ;
Item 51 of 63 Mark item for review
The SAS data set WORK.TEMP is indexed on the variable Id:
Id Amount -- ------ P 52 P 45 A 13 A 56 R 34 R 12 R 78
The following SAS program is submitted:
proc print data=WORK.TEMP; [_insert_BY_statement_] run;
Which BY statement completes the program, creates a listing report that is grouped by Id, and completes without errors?
A. by Id;