1、SASADVANCE63题无问题详解版适合独立练习使用 Item 1 of 63 Mark item for review 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
2、statements. Item 2 of 63 Mark item for review 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 in
3、dex(Id_Code) in WORK.CHECK; Item 3 of 63 Mark item for review 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
4、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
5、 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. Item 4 of 63 Mar
6、k item for review 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 d
7、istinct 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 &GRO
8、UPS separated by , Item 5 of 63 Mark item for review 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 in
9、dex on Code is updated. C. The index on Code is uneffected. D. The sort does not execute. Item 6 of 63 Mark item for review The table WORK.PILOTS contains the following data: WORK.PILOTS Id Name Jobcode Salary - - - - 001 Albert PT1 50000 002 Brenda PT1 70000 003 Carl PT1 60000 004 Donna PT2 80000 0
10、05 Edward PT2 90000 006 Flora PT3 100000 The data set was summarized to include average salary based on jobcode: Jobcode Salary Avg - - - PT1 50000 60000 PT1 70000 60000 PT1 60000 60000 PT2 80000 85000 PT2 90000 85000 PT3 100000 100000 Which SQL statement could NOT generate this result? A. select Jo
11、bcode, Salary, avg(Salary) label=Avg from WORK.PILOTSgroup by Jobcodeorder by Id ; B. select Jobcode, Salary, (select avg(Salary) from WORK.PILOTS as P1 where P1.Jobcode=P2.Jobcode) as Avg from WORK.PILOTS as P2 order by Id ; C. select Jobcode, Salary, (select avg(Salary) from WORK.PILOTS group by J
12、obcode) as Avg from WORK.PILOTSorder by Id ; D. select Jobcode, Salary, Avg from WORK.PILOTS, (select Jobcode as Jc, avg(Salary) as Avg from WORK.PILOTS group by 1)where Jobcode=Jcorder by Id ; Item 7 of 63 Mark item for review A quick rule of thumb for the space required to run PROC SORT is: A. two
13、 times the size of the SAS data set being sorted. B. three times the size of the SAS data set being sorted. C. four times the size of the SAS data set being sorted. D. five times the size of the SAS data set being sorted. Item 8 of 63 Mark item for review Multi-threaded processing for PROC SORT will
14、 effect which of these system resources? A. CPU time will decrease, wall clock time will decrease B. CPU time will increase, wall clock time will decrease C. CPU time will decrease, wall clock time will increase D. CPU time will increase, wall clock time will increase Item 9 of 63 Mark item for revi
15、ew Given the SAS data set WORK.TRANSACT: Rep Cost Ship - - - SMITH 200 50 SMITH 400 20 JONES 100 10 SMITH 600 100 JONES 100 5 The following output is desired: Rep - - JONES 105 SMITH 250 Which SQL statement was used? A. select rep, min(Cost+Ship)from WORK.TRANSACT order by Rep ; B. select Rep, min(C
16、ost,Ship) as Minfrom WORK.TRANSACT summary by Reporder by Rep ; C. select Rep, min(Cost,Ship)from WORK.TRANSACT group by Rep order by Rep ; D. select Rep, min(Cost+Ship)from WORK.TRANSACT group by Rep order by Rep ; Item 10 of 63 Mark item for review The following SAS program is submitted: %let Valu
17、e=9; %let Add=5; %let Newval=%eval(&Value/&Add); %put &Newval; What is the value of the macro variable Newval when the %PUT statement executes? A. 0.555 B. 2 C. 1.8 D. 1 Item 11 of 63 Mark item for review The following SAS code is submitted: data WORK.TEMP WORK.ERRORS / view=WORK.TEMP; infile RAWDAT
18、A; input Xa Xb Xc; if Xa=. then output WORK.ERRORS; else output WORK.TEMP; run; Which of the following is true of the WORK.ERRORS data set? A. The data set is created when the DATA step is submitted. B. The data set is created when the view TEMP is used in another SAS step. C. The data set is not cr
19、eated because the DATA statement contains a syntax error. D. The descriptor portion of WORK.ERRORS is created when the DATA step is submitted. Item 12 of 63 Mark item for review Which title statement would always display the current date? A. title Today is: &sysdate.; B. title Today is: &sysdate9.;
20、C. title Today is: &today.; D. title Today is: %sysfunc(today(),worddate.); Item 13 of 63 Mark item for review Given the SAS data sets: WORK.ONE WORK.TWO Id Name Id Salary - - - - 112 Smith 243 150000 243 Wei 355 45000 457 Jones 523 75000 The following SAS program is submitted: data WORK.COMBINE; me
21、rge WORK.ONE WORK.TWO; by Id; run; Which SQL procedure statement produces the same results? A. create table WORK.COMBINE as select Id, Name, Salary from WORK.ONE full join WORK.TWO on ONE.Id=TWO.Id; B. create table WORK.COMBINE as select coalesce(ONE.Id, TWO.Id) as Id, Name, Salary from WORK.ONE, WO
22、RK.TWO where ONE.Id=TWO.Id ; C. create table WORK.COMBINE as select coalesce(ONE.Id, TWO.Id) as Id, Name, Salary from WORK.ONE full join WORK.TWO on ONE.Id=TWO.Idorder by Id ; D. create table WORK.COMBINE as select coalesce(ONE.Id, TWO.Id) as Id, Name, Salary from WORK.ONE, WORK.TWO where ONE.Id=TWO
23、.Id order by ONE.Id ; Item 14 of 63 Mark item for review The following SAS program is submitted: proc contents data=TESTDATA.ONE; run; Which SQL procedure step produces similar information about the column attributes of TESTDATA.ONE? A. proc sql; contents from TESTDATA.ONE; quit; B. proc sql; descri
24、be from TESTDATA.ONE; quit; C. proc sql; contents table TESTDATA.ONE; quit; D. proc sql; describe table TESTDATA.ONE; quit; Item 15 of 63 Mark item for review Given the SAS data set WORK.ONE: Rep Cost - - SMITH 200 SMITH 400 JONES 100 SMITH 600 JONES 100 The following SAS program is submitted; proc
25、sql; select Rep, avg(Cost) from WORK.ONE order by Rep ; quit; Which result set would be generated? A. JONES 280 JONES 280 SMITH 280 SMITH 280 SMITH 280 B. JONES 600 SMITH 100 C. JONES 280 SMITH 280 D. JONES 100 JONES 100 SMITH 600 SMITH 600 SMITH 600 Item 16 of 63 Mark item for review Given the SAS
26、data sets: WORK.MATH1A WORK.MATH1B Name Fi Name Fi - - - - Lauren L Smith M Patel A Lauren L Chang Z Patel A Hillier R The following SAS program is submitted: proc sql; select * from WORK.MATH1A _insert_set_operator_ select * from WORK.MATH1B ; quit; The following output is desired: Name Fi - - Laur
27、en L Patel A Chang Z Hillier R Smith M Lauren L Patel A Which SQL set operator completes the program and generates the desired output? A. append corr B. union corr C. outer union corr D. intersect corr Item 17 of 63 Mark item for review Which of the following is an advantage of SAS views? A. SAS views can access the most cu
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1