Question 1
Question
Which of the these ORDER BY clauses will display the results ordered by decreasing Salary and then by increasing Name?
Answer
-
order by Salary desc, Name
-
order by descending Salary, Name
-
order by desc Salary, Name
-
order by desc Salary, ascending Name
Question 2
Question
You cannot use SAS formats and labels to customize PROC SQL output
Question 3
Question
What column modifier is used to alter the appearance of the values in that column?
Answer
-
FORMAT=
-
LABEL=
-
LABELX=
-
INFORMAT=
Question 4
Question
Which of the ff. is not true regarding PROC SQL?
Answer
-
PROC SQL is terminated with a RUN statement
-
Each statement is processed individually.
-
The PROC SQL statement does not need to be repeated with each query.
-
No PROC PRINT step is needed to view query results.
Question 5
Question
To eliminate duplicate rows in query results, which keyword should be used?
Answer
-
DISTINCT
-
VALIDATE
-
SINGLE
-
NODUP
Question 6
Question
The ALL keyword is true only if the comparison is true for all returned values
Question 7
Question
SQL uses set operators to combine tables horizontally
Question 8
Question
SQL uses joins to combine tables vertically
Question 9
Question
Full joins include all rows from both tables, even if there are no matching rows in either table
Question 10
Question
To familiarize yourself with the columns in a table, which statement should be used:
Answer
-
DESCRIBE
-
PROPERTY
-
CONTENT
-
FEATURES
Question 11
Question
Inner joins enables a maximum of 256 tables to be joined at the same time.
Question 12
Question
SQL subqueries can return calues to be used in an outer query's FROM clause
Question 13
Question
Which keyword is used to check the SELECT statement syntax?
Answer
-
VALIDATE
-
NOERROR
-
CHECK
-
DETERMINE
Question 14
Question
A type of joins that returns only the matching rows
Answer
-
INNER JOIN
-
OUTER JOIN
-
LEFT JOIN
-
RIGHT JOIN
Question 15
Question
A subquery can return several rows of data but must only return values from a single column
Question 16
Question
Given the following SELECT statement, describe the incorrect syntax********************************************************SELECT a,b,c FROM tblx ORDER BY b WHERE tblx.a > 10;
Answer
-
arrangement of clauses
-
missing comma
-
missing semi-colon
-
none of the above
Question 17
Question
It is created by placing a query expression in a FROM clause where a table name would normally be used
Answer
-
IN LINE VIEW
-
subquery
-
virtual table
-
nested query
Question 18
Question
Correlated subqueries can be evaluated independently
Question 19
Question
If a summary function specifies only one column name, the statistic is calculated down the columb (across rows)
Question 20
Question
In a correlated subquery, the inner query provides information so that the subquery resolves successfully
Question 21
Question
A condition that will evaluate to true if the subquery returns no data
Answer
-
NOT EXIST
-
NOT IN
-
IN
-
EXIST
Question 22
Question
When a SELECT list contains both a column created by a summary function and a column that is not summarized, by default, the summarized data is appended to each row of the original data table (remerged) in order to produce the output.
Question 23
Question
The COALESCE function returns the value of the first missing argument
Question 24
Question
If the summary function specifies more than one column, the statistic is calculated for the row (using values from the listed columns)
Question 25
Question
The COUNT function returns the number of columns returned by a query
Question 26
Question
If you specify the ANY keyword before a subquery, the comparison is true if it is false for any of the values that the subquery returns
Question 27
Question
Views often save space, because a view is usually quite small compared with the data that it accesses
Question 28
Question
To search for actual percent or underscore characters in your text using the LIKE operator, you must use an:
Answer
-
ESCAPE CLAISE
-
FREE CLAUSE
-
LIKE CLAUSE
-
EXIT CLAUSE
Question 29
Question
SQL subqueries can return values to be used in an outer query's FROM clause
Question 30
Question
What column modifier is used to alter the appearance of the values in that column?
Answer
-
FORMAT=
-
LABELX=
-
LABEL=
-
INFORMAT=
Question 31
Question
Find the incorrect syntax on the ff. select statement:**********************proc sql; SELECT Employee_ID, Employee_Gender, Salary, from orion.Employee_Payroll where Employee_Gender='F' order by Salary desc; quit;
Answer
-
exceeds use of comma
-
missing semi-colon
-
missing quote
-
missing comma
Question 32
Question
Which of the following is not a feature of SELECT statement
Question 33
Question
How many tables can be combines using a single inner join?
Question 34
Question
The HAVING clause is processed before the GROUP BY clause and determines which groups will be displayed
Question 35
Question
Which of the follwing statements is true when processing an inner join in PROC SQL
Answer
-
Builds the cartesian product of all tables listed and applies the WHERE clause to limit the rows returned
-
applies the WHERE clause to limit the rows returned then build the Cartesian product of all the tables listed and
-
builds the Cartesian product of all the tables listed and
display the results
-
no need to build the Cartesian product of all the tables listed and
applies the WHERE clause to limit the rows returned
Question 36
Question
Outer joins can only be performed on two tables at a time
Question 37
Question
Which of the following is not true regarding subqueries
Answer
-
Can return single row with multiple columns
-
return values to be used in the outer query’s
WHERE or HAVING clause
-
can return single or multiple values
-
must return only a single column.
Question 38
Question
A query corresponds to a single SELECT statement within a DATA step
Question 39
Question
The IN CLAUSE specifies the criteria in outer joins
Question 40
Question
To create and populate a table with the rows from an SQL query, which of the following statement should be used:
Answer
-
CREATE TABLE
-
CREATE QUERY
-
CREATE VIEW
-
CREATE POPULATE
Question 41
Question
The EQUAL operator does not accept any expression that resolves to more than a single value
Question 42
Question
The WHERE clause is processed before a GROUP BY clause and determines which individual rows are available for grouping
Question 43
Question
Which of the following WHERE clauses correctly selects rows with a Job_Code value that begins with a underscore?
Answer
-
where Job_Code like '/_%' escape '/'
-
where Job_Code contains '_%'
-
where Job_Code like '%_' exit '/_'
-
where Job_Code like '_%'
Question 44
Question
Which of these DATA step statements is used to combine tables horizontally?
Question 45
Question
In an ORDER BY clause, order the query results by specifying the following except for:
Answer
-
a combination of any of the above, with individual items separated by semi-colon
-
an expression
-
a column name or a number representing the position of an item in the SELECT list
-
any column name from any table in the FROM clause, even if the column is not in the SELECT list
Question 46
Question
Correlated subqueries use very few resources and are inexpensive to execute
Question 47
Question
When using an askterisk for the select list, you can specify the FEEDBACK option to write the expanded SELECT statement to the SAS log
Question 48
Question
A subquery can return severa rows of data but must only return values from a single column
Question 49
Question
Left joins include all rows from the second table, even if there are no matching rows in the first table
Question 50
Question
What column modifier is used to alter the appearance of the values in that column?
Answer
-
FORMAT=
-
LABEL=
-
LABELX=
-
INFORMAT=