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 clauses in the PROC SQL program below is written incorrectly?
    proc sql;
       select style sqfeet bedrooms
          from choice.houses
          where sqfeet ge 800;
    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 sales.produce
          order by sumsales;
    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 List.Size and to select Price from the table List.Price. (Only the Address column appears in both tables.)
    proc sql;
       _____________
           where size.address = price.address;
           from list.size,list.price;
    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. If you specify a CREATE TABLE statement in your PROC SQL step,
    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.
  9. Which statement is true regarding the use of the PROC SQL step to query data that is stored in two or more tables?
    1. When you join multiple tables, the tables must contain a common column.
    2. You must specify the table from which you want each column to be read.
    3. The tables that are being joined must be from the same type of data source.
    4. If two tables that are being joined contain a same-named column, then you must specify the table from which you want the column to be read.
  10. Which clause in the following program is incorrect?
    proc sql;
       select sex,mean(weight) as avgweight
          from company.employees company.health
          where employees.id=health.id
          group by sex;
    1. SELECT
    2. FROM
    3. WHERE
    4. GROUP BY
..................Content has been hidden....................

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