A Cartesian product
is returned when join conditions are not specified in a PROC SQL join.
In a Cartesian product, each row from the first table is combined
with every row from the second table.
Correct answer: b
This PROC SQL query
is an inner join. It combines the rows from the first table that match
rows from the second table, based on the matching criteria that are
specified in the WHERE clause. Columns are not overlaid, so all columns
from the referenced tables (including any columns with duplicate names)
are displayed. Any unmatched rows from either table are not displayed.
Correct answer: a
This PROC SQL query
is a left outer join, which retrieves all rows that match across tables
(based on the join conditions in the ON clause), plus nonmatching
rows from the left (first) table. No columns are overlaid, so all
columns from both tables are displayed.
Correct answer: c
Inner joins combine
the rows from the first table that match rows from the second table,
based on one or more join conditions in the WHERE clause. The columns
being matched must have the same data type, but they are not required
to have the same name. For joins, the tables being joined can have
different numbers of columns, and the rows do not need to be sorted.
Correct answer: c
In order to generate
the same output as the DATA step and PROC PRINT steps, the PROC SQL
full outer join must use the COALESCE function with the duplicate
columns specified as arguments.
Correct answer: d
The use of summary functions
does not require the use of table aliases. All of the other statements
about table aliases that are shown here are true.
Correct answer: d
If you are joining two
tables that contain a same-named column, you must use a prefix to
specify the table or tables from which you want the column to be read.
Remember that if you join tables that do not contain columns that
have matching data values, you can produce a huge amount of output.
Be sure to specify a WHERE clause to select only the rows that you
want.