Question 6 of 33


Given the SAS data sets:

The SAS program is submitted:

What output will be produced?

    Correct Answer: B

    The PROC SQL query is using the 'EXCEPT ALL' clause to find names that are in WORK.CLASS1 but not in WORK.CLASS2, considering duplicates. In WORK.CLASS1, 'Lauren' appears once, 'Patel' appears once, and 'Chang' appears twice. In WORK.CLASS2, 'Patel' appears once and none of the other names from WORK.CLASS1 appear. As a result, 'Lauren' and one occurrence of 'Chang' remain from WORK.CLASS1 after subtracting the overlapping names from WORK.CLASS2. Thus, the output will be 'Lauren' and 'Chang' occurring twice as it is duplicated in WORK.CLASS1.

Question 7 of 33


Given the SAS data sets:

A SAS program is submitted and the following is written to SAS to:

What would allow the program to successfully execute without errors?

    Correct Answer: D

    The error occurs because the subquery returns multiple rows, but the main query expects a single value due to the use of the equal sign (=). To correct this, you should use the IN operator, which allows the main query to handle multiple values returned by the subquery. This change enables the program to successfully execute without errors.

Question 8 of 33


Given the data sets:

The following SAS program is submitted:

Which result set would be generated?

    Correct Answer: C

    The SQL query is performing a right join between two datasets on the 'Year' column. This means all rows from WORK.TWO will be included, along with matching rows from WORK.ONE. For connection, only the 2010 and 2011 years appear in WORK.TWO. In these years, there is data for profit as 100 for 2010 and 200 for 2011. Therefore, summing these profits gives 100 + 200 = 300.

Question 9 of 33


Given the SAS data set WORK TRANSACT:

The following output is desired:

Which SQL statement was used?

    Correct Answer: B

    The desired output displays the minimum value between 'Cost' and 'Ship' for each representative, but this minimum value is assigned to each row corresponding to that representative. In the given options, only option B calculates the minimum sum of 'Cost' and 'Ship', which matches the desired output. Options C and D perform grouping by 'Rep,' which would result in aggregated results for each representative, and option A uses incorrect syntax with 'summary' instead of 'group by.' Therefore, option B is correct as it calculates and displays the minimum of the sums of 'Cost' and 'Ship' for each 'Rep' without grouping, producing the desired output.

Question 10 of 33


This question will ask you to provide a segment of missing code.

Given the SAS data set WORK EXAM:

TotalScore -

----------------

512

657

*

782

The following SAS program is submitted:

The following output is desired:

TotalScore -

--------------

512

657

782

Which WHERE expression completes the program and generates the desired output?

    Correct Answer: A

    To obtain the desired output, the correct expression to use in the SQL query is 'Where TotalScore is not missing'. This expression will filter out any rows where the TotalScore value is missing, including the row with the asterisk ('*'). The other options do not pertain to filtering out missing data in the context provided.