GoConqr has a new look! Let us know what you think.

Quiz

Crackman ADV 63

Fiona Yang 61 questions

Take the quiz

This quiz has a time limit, so it opens in the usual player.

Questions in this quiz (61)

  1. 1The SAS data set WORK.CHECK has a variable named Id_Code in it. Which SQL statement would create an index on this variable?
    1. Acreate index Id_Code on WORK.CHECK;
    2. Bcreate index(Id_Code) on WORK.CHECK;
    3. Cmake index=Id_Code from WORK.CHECK;
    4. Ddefine index(Id_Code) in WORK.CHECK;
  2. 2Given 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?
    1. AReplace the where clause with:

      where EMPLOYEE.Name=(select Names delimited with \’,\’
      from WORK.NEWEMPLOYEE
      where Salary > 40000);
    2. BReplace line 104 with:

      where EMPLOYEE.Name =ANY (select Names separated with \’,\’
      from WORK.NEWEMPLOYEE
      where Salary > 40000);
    3. CReplace the equal sign with the IN operator.
    4. DQualify the column names with the table names
  3. 3Given 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?
    1. Ainto &GROUPS
    2. Binto :GROUPS
    3. Cinto :GROUPS separated by \’,\’
    4. Dinto &GROUPS separated by \’,\’
  4. 4 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?
    1. AThe index on Code is deleted.
    2. BThe index on Code is updated.
    3. CThe index on Code is uneffected.
    4. DThe sort does not execute.
  5. 5The following SAS program is submitted:
    %let Value=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?
    1. A0.555
    2. B2
    3. C1.8
    4. D1
  6. 6 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?
    1. Aselect rep,min(Cost+Ship)
      from WORK.TRANSACT order by Rep;
    2. Bselect Rep,min(Cost,Ship) as Min
      from WORK.TRANSACT
      summary by Rep order by Rep;
    3. Cselect Rep,min(Cost,Ship)
      from WORK.TRANSACT
      group by Rep order by Rep;
    4. Dselect Rep,min(Cost+Ship)
      from WORK.TRANSACT
      group by Rep order by Rep;
  7. 7The 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
    005 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?
    1. Aselect
      Jobcode,
      Salary,
      avg(Salary) label=\’Avg\’
      from WORK.PILOTS
      group by Jobcode
      order by Id ;
    2. Bselect
      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
      ;
    3. Cselect
      Jobcode,
      Salary,
      (select avg(Salary)
      from WORK.PILOTS
      group by Jobcode) as Avg
      from WORK.PILOTS
      order by Id
      ;
    4. Dselect
      Jobcode,
      Salary,
      Avg
      from
      WORK.PILOTS,
      (select
      Jobcode as Jc,
      avg(Salary) as Avg
      from WORK.PILOTS
      group by 1)
      where Jobcode=Jc
      order by Id
  8. 8Given 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;
    merge WORK.ONE WORK.TWO;
    by Id;
    run;

    Which SQL procedure statement produces
    the same results?
    1. Acreate table WORK.COMBINE as
      select
      Id,
      Name,
      Salary
      from
      WORK.ONE
      full join
      WORK.TWO
      on ONE.Id=TWO.Id
      ;
    2. Bcreate table WORK.COMBINE as
      select
      coalesce(ONE.Id, TWO.Id) as Id,
      Name,
      Salary
      from
      WORK.ONE,
      WORK.TWO
      where ONE.Id=TWO.Id
      ;
    3. Ccreate 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.Id
      order by Id
      ;
    4. Dcreate table WORK.COMBINE as
      select
      coalesce(ONE.Id, TWO.Id) as Id,
      Name,
      Salary
      from
      WORK.ONE,
      WORK.TWO
      where ONE.Id=TWO.Id
      order by ONE.Id
      ;
  9. 9The 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?
    1. Aproc sql;
      contents from TESTDATA.ONE;
      quit;
    2. Bproc sql;
      describe from TESTDATA.ONE;
      quit;
    3. Cproc sql;
      contents table TESTDATA.ONE;
      quit;
    4. Dproc sql;
      describe table TESTDATA.ONE;
      quit;
  10. 10Given 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 sql;
    select
    Rep,
    avg(Cost)
    from WORK.ONE
    order by Rep
    ;
    quit;

    Which result set would be generated?
    1. AJONES 280
      JONES 280
      SMITH 280
      SMITH 280
      SMITH 280
    2. BJONES 600
      SMITH 100
    3. CJONES 280
      SMITH 280
    4. DJONES 100
      JONES 100
      SMITH 600
      SMITH 600
      SMITH 600

Information

Description
SAS Statistics Quiz on Crackman ADV 63, created by Fiona Yang on 06/01/2017.
Language
English
Views
206
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?