c*********n 发帖数: 87 | 1 phone interview questions:
1. two data sets(one and two) both have one common variable: out3, which
out3 will appear in the regular join result of proc sql?
he told me regular join means whatever join(inner or outer) in sql.
I think this is tricky since if you specify the variable name(like: one.out3
) in select statement, the results would be different.
if you do not specify the variable name , then the result only includes the
first data set.
data one;
input out3 $ a b c;
cards;
a 3 4 5
b 4 8 |
g**a 发帖数: 2129 | 2 For question one, I think the answer is the dataset that is the first in the FROM statement.
For the second question, the only way I can think of is using IML. How could
you do it by transpose? |
C******t 发帖数: 72 | 3 data set2 (keep=product month sales);
set set1;
product= product;
array salearray month1-month12;
do i=1 to 12;
month=i;
sales=salearray{i};
output;
end;
run;
Get Backward:
data set3(drop=sales month i);
retain product;
array salearray month1-month12;
do i=1 to 12;
set set2 ;
product=product;
salearray{i}=sales;
end;
output;
run; |
S******y 发帖数: 1123 | 4 #2 (roll up or reverse) is a typical interview question for business/marking
analytics |
p*****o 发帖数: 543 | 5 couldnt we just use the normal transpose procedure?
proc transpose data = a;
by product;
var month1 -- month12;
run;
the FROM statement.
could
【在 g**a 的大作中提到】 : For question one, I think the answer is the dataset that is the first in the FROM statement. : For the second question, the only way I can think of is using IML. How could : you do it by transpose?
|