SAS Certified Adv Programmer 50 Questions (6)
Given the following SAS data sets One and Two:
One
| Num | Product |
| 1 | Computer |
| 2 | Printer |
| 3 | Monitor |
| 4 | Keyboard |
| 5 | Modem |
Two
| Num | Product |
| 1 | Portable |
| 5 | External |
The following SAS program is submitted:
proc sql;
select product
from one
where exists
(select *
from two
where one.num=two.num);
Which of the following reports is generated?
a.
| Product |
| Computer |
| Modem |
b.
| Product |
| Computer |
| Printer |
c.
| Product |
| Printer |
| Monitor |
| Keyboard |
d.
| Product |
| Computer |
| Printer |
| Monitor |
| Keyboard |
| Modem |
Topics:
SAS Adv Questions |
1 Comment »
SAS Certified Adv Programmer 50 Questions (5)
Given the following SAS data sets One and Two:
One
| Num | Var1 |
| 1 | A |
| 1 | A |
| 2 | B |
| 3 | C |
Two
| Num | Var2 |
| 1 | A |
| 4 | Y |
| 4 | Z |
The following SAS program is submitted:
proc sql;
select *
from one
intersect all
select *
from two;
quit;
Which of the following reports is generated?
a.
| Num |
| 1 |
b.
| Num |
| 1 |
| 2 |
c.
| Num | Var1 |
| 1 | A |
d.
| Num | Var1 |
| 1 | A |
| 1 | A |
Topics:
SAS Adv Questions |
3 Comments »
SAS Certified Adv Programmer 50 Questions (4)
Given the following SAS data sets One and Two:
One
| Num | Var1 |
| 1 | A |
| 1 | A |
| 2 | B |
| 3 | C |
Two
| Num | Var2 |
| 1 | A |
| 4 | Y |
| 4 | Z |
The following SAS program is submitted:
proc sql;
select *
from one
except
select *
from two;
quit;
Which of the following reports is generated?
a.
| Num |
| 2 |
| 3 |
b.
| Num | Var1 |
| 2 | B |
| 3 | C |
c.
| Num | Var1 |
| 1 | A |
| 2 | B |
| 3 | C |
d.
| Num | Var2 |
| 1 | A |
| 4 | Y |
| 4 | Z |
Topics:
SAS Adv Questions |
3 Comments »
SAS Certified Adv Programmer 50 Questions (3)
Which one of the following programs is syntactically correct?
a.
proc sql;
create table forecast as
select a.*, b.sales
from actual a, budget b
where a.dept=b.dept and
a.month=b.month;
quit;
b.
proc sql;
create table forecast as
select a.* b.sales
from actual as a, budget as b
where a.dept=b.dept and
a.month=b.month;
quit;
c.
proc sql;
create table forecast as
select a.*, b.sales
from actual as a, budget as b
where dept=dept and
month=month;
quit;
d.
proc sql;
create table forecast as
select a.*, b.sales
from actual, budget
where a.dept=b.dept and
a.month=b.month;
quit;
Topics:
SAS Adv Questions |
3 Comments »
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 »