Chapter Quiz

Select the best answer for each question. After completing the quiz, check your answers using the answer key in the appendix.
  1. If you specify a CREATE TABLE statement in your PROC SQL step, which of the following happens?
    1. The results of the query are displayed, and a new table is created.
    2. A new table is created, but it does not contain any summarization that was specified in the PROC SQL step.
    3. A new table is created, but no report is displayed.
    4. Results are grouped by the value of the summarized column.
  2. Which of the following PROC SQL steps creates a new table by copying only the column structure (but not the rows) of an existing table?
    1. proc sql;
         create table work.newpayroll as 
            select *
               from certadv.payrollmaster;
      quit;
    2. proc sql;
         create table work.newpayroll 
            like certadv.payrollmaster;
      quit;
    3. proc sql;
         create table work.newpayroll 
            copy certadv.payrollmaster;
      quit;
    4. proc sql;
         create table work.newpayroll 
            describe certadv.payrollmaster;
      quit;
  3. Which of the following PROC SQL steps creates a table that contains rows for the level-1 flight attendants only?
    1. proc sql;
         create table work.newpayroll as
            select *
               from certadv.payrollmaster
               where jobcode='FA1';
      quit;
    2. proc sql;
         create work.newpayroll as
            select *
               from certadv.payrollmaster
               where jobcode='FA1';
      quit;
    3. proc sql;
         create table work.newpayroll
            copy certadv.payrollmaster
               where jobcode='FA1';
      quit;
    4. proc sql;
         create table work.newpayroll as
                certadv.payrollmaster
            where jobcode='FA1';
      quit;
  4. Which of the following statements is used to add new rows to a table?
    1. INSERT
    2. LOAD
    3. VALUES
    4. CREATE TABLE
  5. Which of the following displays the structure of a table in the SAS log?
    1. proc sql;
         describe as
            select *
               from certadv.payrollmaster;
      quit;
    2. proc sql;
         describe contents certadv.payrollmaster;
      quit;
    3. proc sql;
         describe table certadv.payrollmaster;
      quit;
    4. proc sql;
         describe * from certadv.payrollmaster;
      quit;
  6. Which of the following creates an empty table that contains the two columns FullName and Age?
    1. proc sql;
         create table work.names
                (FullName char(25), Age num);
      quit;
    2. proc sql;
         create table work.names as
                (FullName char(25), Age num);
      quit;
    3. proc sql;
         create work.names
                (FullName char(25), Age num);
      quit;
    4. proc sql;
         create table work.names
            set (FullName char(25), Age num);
      quit;
Last updated: October 16, 2019
..................Content has been hidden....................

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