Select the best answer
for each question. After completing the quiz, check your answers using
the answer key in the appendix.
-
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;
-
How many statements
does the program below contain?
proc sql;
select grapes,oranges,
grapes + oranges as sumsales
from certadv.produce
order by sumsales;
quit;
-
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;
-
select address,sqfeet,price
-
select size.address,sqfeet,price
-
select price.address,sqfeet,price
-
-
Which of the clauses
below correctly sorts rows by the values of the columns Price and
SqFeet?
-
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.
-
select sales.produce sales.hardware
-
from sales.produce sales.hardware
-
from sales.produce,sales.hardware
-
where sales.produce, sales.hardware
-
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,
________________
-
What happens if you
use a GROUP BY clause in a PROC SQL step without a summary function?
-
The step does not execute.
-
The first numeric column
is summed by default.
-
The GROUP BY clause
is changed to an ORDER BY clause.
-
The step executes but
does not group or sort data.
-
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;