Choice Questions well answered
Which of the following statements is false regarding PROC SQL?
a. The PROC SQL statement does not need to be repeated with each query
b. Each statement is processed individually
c. A PROC PRINT step is needed to view the query results
d. No PROC SORT step is needed to order query results - correct answer ✔✔ c. A PROC PRINT
step is needed to view the query results
A SELECT statement contains smaller building blocks called
a. clauses
b. statements
c. sub-statements
d. sections - correct answer ✔✔ a. clauses
Which of the following statements is false regarding the VALIDATE option?
a. It checks the SELECT statement syntax without executing the query
b. It checks column name validity
c. It prints error messages for invalid queries
d. It is used for SELECT and FROM statements - correct answer ✔✔ d. It is used for SELECT and
FROM statements
Which option was used to produce this output in the SAS log?
proc sql feedback;
,select *
from orion.Employee_Payroll;
NOTE: Statement transforms to
select EMPLOYEE_PAYROLL.Employee_ID,
EMPLOYEE_PAYROLL.Birth_Date, EMPLOYEE_PAYROLL.Employee_Hire_Date
from ORION.EMPLOYEE_PAYROLL;
quit;
a. feedback
b. *
c. from orion.Employee_Payroll;
d. quit; - correct answer ✔✔ a. feedback
What statements writes the table definition, including column information, to the SAS log? It
provides output similar to PROC CONTENTS.
a. feedback
b. describe
c. select *
d. escape - correct answer ✔✔ b. describe
Which SCAN statement correctly selects the course level from the variable Course?
Course:
Algebra 1
Algebra 2
Honors Algebra 1
Honors Algebra 2
,a. scan(course, -1, ' ')
b. scan(course, 2, ' ')
c. scan(course, -1, 1)
d. scan(course, 2, 3) - correct answer ✔✔ a. scan(course, -1, ' ')
Which of the statements clauses in the PROC SQL program below is written incorrectly?
proc sql;
select stdID gpa class
from student.stats
where gpa ge 4.-;
a. SELECT
b. FROM
c. WHERE
d. both a and c - correct answer ✔✔ a. SELECT
How many statements does the program below contain?
proc sql;
select *
from sales.fruit
order by totsales;
a. two
b. three
c. four
, d. five - correct answer ✔✔ a. two
Write the expression to create a new column named Savings by subtracting the values of the
column Expenses from those of the column Pay.
a. Savings = Pay-Expenses
b. Pay-Expenses as Savings
c. Pay-Expenses = Savings
d. Savings as Pay-Expenses - correct answer ✔✔ b. Pay-Expenses as Savings
Submit the following PROC SQL step:
proc sql;
select*
from stats;
quit;
Where is the query result sent?
a. the SAS log
b. the Report window
c. the Output window
d. a table is created and no output is displayed - correct answer ✔✔ c. the Output window
Which select statement correctly eliminates duplicate rows in the query results?
a. select all Department
from orion.employee_organization;
b. select Department
from orion.employee_organization;