SAS Certified Adv Programmer 50 Questions (2)
Given the following SAS data sets One and Two:
One
| Year | Qtr | Budget |
| 2001 | 3 | 500 |
| 2001 | 4 | 400 |
| 2002 | 1 | 700 |
Two
| Year | Qtr | Sales |
| 2001 | 4 | 300 |
| 2002 | 1 | 600 |
The following SAS program is submitted:
proc sql;
select one.*, sales
from one right join two
on one.year=two.year;
quit;
Which of the following reports is generated?
a.
| Year | Qtr | Budget | Sales |
| 2001 | 3 | 500 | . |
b.
| Year | Qtr | Budget | Sales |
| 2001 | 4 | 400 | 300 |
| 2002 | 1 | 700 | 600 |
c.
| Year | Qtr | Budget | Sales |
| 2001 | 3 | 500 | . |
| 2001 | 4 | 400 | 300 |
| 2002 | 1 | 700 | 600 |
d.
| Year | Qtr | Budget | Sales |
| 2001 | 3 | 500 | 300 |
| 2001 | 4 | 400 | 300 |
| 2002 | 1 | 700 | 600 |
Topics:
SAS Adv Questions |
3 Comments »
D
Should’nt it be B? Becoz the right join while picking up common obs retains the exclusive right table rows. Since there are no exclusive right table rows, it picks up the common rows. Pl clarify.
D, matching rows + non matching row from the right. no non matching row from the right