Quiz

Select the best answer for each question. After completing the quiz, check your answers using the answer key in the appendix.
  1. Which of the statements or clauses in the PROC SQL program below is written incorrectly?
    proc sql;
       select style sqfeet bedrooms
          from certadv.houses
          where sqfeet ge 800;
    quit;
    1. SELECT
    2. FROM
    3. WHERE
    4. Both a and c.
  2. How many statements does the program below contain?
    proc sql;
       select grapes,oranges,
              grapes + oranges as sumsales
          from certadv.produce
          order by sumsales;
    quit;
    1. two
    2. three
    3. four
    4. five
  3. Complete the following PROC SQL query to select the columns Address and SqFeet from the table Certadv.Size and to select Price from the table Certadv.Price. (Only the Address column appears in both tables.)
    proc sql;
       _____________
           from certadv.size left join certadv.price;
           on size.address = price.address;
    quit;
    1. select address,sqfeet,price
    2. select size.address,sqfeet,price
    3. select price.address,sqfeet,price
    4. Either b or c.
  4. Which of the clauses below correctly sorts rows by the values of the columns Price and SqFeet?
    1. order price, sqfeet
    2. order by price,sqfeet
    3. sort by price sqfeet
    4. sort price sqfeet
  5. Which clause below specifies that the two tables Produce and Hardware be queried? Both tables are located in a library to which the libref Sales has been assigned.
    1. select sales.produce sales.hardware
    2. from sales.produce sales.hardware
    3. from sales.produce,sales.hardware
    4. where sales.produce, sales.hardware
  6. Complete the SELECT clause below to create a new column named Profit by subtracting the values of the column Cost from those of the column Price.
    select fruit,cost,price,
        ________________
    1. Profit=price-cost
    2. price-cost as Profit
    3. profit=price-cost
    4. Profit as price-cost
  7. What happens if you use a GROUP BY clause in a PROC SQL step without a summary function?
    1. The step does not execute.
    2. The first numeric column is summed by default.
    3. The GROUP BY clause is changed to an ORDER BY clause.
    4. The step executes but does not group or sort data.
  8. Which clause in the following program is incorrect?
    proc sql;
       select age,mean(weight) as avgweight
          from certadv.employees certadv.health
          where employees.id=health.id
          group by age;
    quit;
    1. SELECT
    2. FROM
    3. WHERE
    4. GROUP BY
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