Quiz

Select the best answer for each question. After completing the quiz, check your answers using the answer key in the appendix.
  1. Which statement is false with respect to a set operation that uses the EXCEPT, UNION, or INTERSECT set operator without a keyword?
    1. Column names in the result set are determined by the first table.
    2. To be overlaid, columns must be of the same data type.
    3. To be overlaid, columns must have the same name.
    4. By default, only unique rows are displayed in the result set.
  2. The keyword ALL cannot be used with which of the following set operators?
    1. EXCEPT
    2. INTERSECT
    3. UNION
    4. OUTER UNION
  3. Which PROC SQL step combines the tables Summer and Winter to produce the output displayed below?
    Quiz output
    1. proc sql;
         select *
            from summer
         intersect all
         select *
            from winter;
    2. proc sql;
         select *
            from summer
         outer union
         select *
            from winter;
    3. proc sql;
         select *
            from summer
         union corr
         select *
            from winter;
    4. proc sql;
         select *
            from summer
         union
         select *
            from winter;
  4. Which PROC SQL step combines tables but does not overlay any columns?
    1. proc sql;
         select *
            from groupa
         outer union
         select *
            from groupb;
    2. proc sql;
         select *
            from groupa as a
         outer union corr
         select *
            from groupb as b;
    3. proc sql;
         select coalesce(a.obs, b.obs)
                label='Obs', med, duration
            from groupa as a
            full join 
            groupb as b
            on a.obs=b.obs;
    4. proc sql;
         select *
            from groupa as a
         intersect
         select *
            from groupb as b;
  5. Which statement is false regarding the keyword CORRESPONDING?
    1. It cannot be used with the keyword ALL.
    2. It overlays columns by name, not by position.
    3. When used in EXCEPT, INTERSECT, and UNION set operations, it removes any columns not found in both tables.
    4. When used in OUTER UNION set operations, it causes same-named columns to be overlaid.
  6. Which PROC SQL step generates the following output from the tables Dogs and Pets?
    Quiz Output
    1. proc sql;
         select name, price
            from pets 
         except all
         select *
            from dogs;
    2. proc sql;
         select name, price
            from pets 
         except
         select *
            from dogs;
    3. proc sql;
         select name, price
            from pets 
         except corr all
         select *
            from dogs;
    4. proc sql;
         select *
            from dogs 
         except corr
         select name, price
            from pets;
  7. The PROG1 and PROG2 tables list students who took the PROG1 and PROG2 courses, respectively. Which PROC SQL step gives you the names of the students who took only the PROG1 class?
    Quiz Output
    1. proc sql;
         select fname, lname
            from prog1
         intersect
         select fname, lname
            from prog2;
    2. proc sql;
         select fname, lname
            from prog1
         except all
         select fname, lname
            from prog2;
    3. proc sql;
         select *
            from prog2
         intersect corr
         select *
            from prog1;
    4. proc sql;
         select *
            from prog2
         union
         select *
            from prog1;
  8. Which PROC SQL step returns the names of all the students who took PROG1, PROG2, or both classes?
    Quiz Output
    1. proc sql;
         select fname, lname
            from prog1
         intersect
         select fname, lname
            from prog2;
    2. proc sql;
         select fname, lname
            from prog1
         outer union corr
         select fname, lname
            from prog2;
    3. proc sql;
         select fname, lname
            from prog1
         union
         select fname, lname
            from prog2;
    4. proc sql;
         select fname, lname
            from prog1
         except corr
         select fname, lname
            from prog2;
  9. Which PROC SQL step returns the names of all the students who took both the PROG1 and PROG2 classes?
    Quiz Output
    1. proc sql;
         select fname, lname
            from prog1
         union
         select fname, lname
            from prog2;
    2. proc sql;
         select fname, lname
            from prog1
         except corr
         select fname, lname
            from prog2;
    3. proc sql;
         select fname, lname
            from prog1
         intersect all
         select fname, lname
            from prog2;
    4. proc sql;
         select fname, lname
            from prog1
         union corr
         select fname, lname
            from prog2;
  10. Which PROC SQL step generates the same results as the following DATA step?
    data allstudents;
       set prog1 prog2;
       by lname;
    run;
    proc print noobs;
    run;
    PROG1 and PROG2 Tables
    1. proc sql;
         select fname, lname
            from prog1
         outer union corr
         select fname, lname
            from prog2
         order by lname;
    2. proc sql;
         select fname, lname
            from prog1
         union
         select fname, lname
            from prog2
         order by lname;
    3. proc sql;
         select fname, lname
            from prog2
         outer union
         select fname, lname
            from prog1
         order by lname;
    4. proc sql;
         select fname, lname
            from prog2
         union corr
         select fname, lname
            from prog1
         order by lname;
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.37.12