楼主: vivian1129m
5200 10

[学习分享] SAS advanced 2019.5.30 98%通过 题库未变 [推广有奖]

  • 0关注
  • 2粉丝

大专生

90%

还不是VIP/贵宾

-

威望
0
论坛币
13 个
通用积分
7.3001
学术水平
1 点
热心指数
2 点
信用等级
0 点
经验
1192 点
帖子
53
精华
0
在线时间
59 小时
注册时间
2019-1-17
最后登录
2020-8-22

楼主
vivian1129m 发表于 2019-5-31 18:18:57 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
135min, 60题。
考了3道填空,1道多选。


一个月之内把SAS base和SAS advanced考完了,算是赶在了改革之前把所有东西都搞定了。写这个帖子主要让大家放心,题库未变。好好刷63题+MZX最强机经+质素机经+其他机经,考到100%或者接近分数是绝对没问题的。
我具体复习时间少于两周。我一年前上课选修过SQL。只是入门,忘记得差不多了,但思路还是有的,有助于理解SAS的macro这块。完全没碰过sql的朋友建议还是去看一下online tutor,扫一眼就好了。没基础的朋友赶时间一点,大概两周的准备时间比较充分。
链接在这:http://serwer.robert.webd.pl:30/SasOnlineTutorAdvanced/en/59267/index.htm


一开始做63题时,我整个懵逼,SAS base的crackman的70题是把东西切成一小块,很容易消化,事无巨细都一五一十地解释了。但是63题虽说大部分有解释,很多解释的都是重点,细节也有,但基础是不覆盖的。如果这个题目涉及好几个你都不懂的点,光看解释有点吃力。建议要么看online tutor,要么查资料做个笔记。

一开始做63题,很多不懂让我心烦。不过大概做了前面,后面的题就好理解多了,做起来也没那么痛苦了。二刷三刷速度蹭蹭的提高。

和考SAS base一样,我用了小沐君的良心资料包。特别全,重点和选看都标注分类了,里面有必看的最强机经和质素机经,还有其他带日期的散装JJ。包括了一些帮助学习理解的资料和练习题对应的SAS code。有不懂的题目注意去看看code跑一下,能快速理解。

https://bbs.pinggu.org/thread-7095631-1-1.html

我的机经和复习方法是根据小沐君的资料包。
关于考试的机经,63题的机经都大同小异,常考题都是那些,所以只要看近期的机经标注题号,不用把所有散装机经都看一遍。
我自己的方法:
1,先把63题过2遍+ 官网的sample题9道(Q2 Q5原题 高频出现)
2,最强机经和质素机经一定要看!涵盖所有题目
3,散装带日期的JJ看看最近的就差不多了,留意一下高频题目。

最强机经和质素机经有些题给了大概的code形容,但没有给出题目具体的样子。
我去考试的时候留心记忆了几道原题,都用红字标了原题。希望可以帮助大家理解,不用死记。

附件有5月20之后的两篇机经和我自己的机经。不收币了。
不知道下载是不是也要扣流量币,先po附件。因为JJ涉及一些图和格式,不好直接粘贴到这个帖子的回复里。后面我再想想办法。急用的同学先下载附件吧。

最后,我觉得SAS adv比SAS base好考。往往考出来比Base高分。因为范围就这么小,63题,sample,机经。
祝大家好运!
2019.5.30.rar (2.41 MB)







二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝


已有 1 人评分经验 收起 理由
eijuhz + 60 精彩帖子

总评分: 经验 + 60   查看全部评分

沙发
roy2018 发表于 2019-6-1 07:43:52
谢谢上传

藤椅
vivian1129m 发表于 2019-6-29 14:07:49
63题:
Q2
Q3
Q4 - 变形,考了两道变形:
(1)        题目给了C选项,问what groups will be stored?  选0-29,30-49,50+
(2)        通过SQL中select into:clause生成新的macro变量。
Desired output: “&Shoesales1.:&Shoestype1.,
&Shoesales2.:&Shoestype2.,
&Shoesales3.:&Shoestype3.,

选INTO :Shoesales1- :Shoesales3, :Shoestype1- :Shoestype3
注意:a.冒号的位置  b.中间的横杠
干扰项:INTO: Shoesales1- Shoesales3, :Shoestype1- Shoestype3
干扰项的shoesales3和shoestype3前没有冒号,注意

Q9 - 变形 变成了
Jones 105
Jones 105
Smith 105
Smith 105
Smith 105
选A没有group by ,min(cost+ship)的那个
Q10 -变形 换成了11和5 选2

Q11 - 答案不变, 但是有改写 把 when 。。。。 dataset created。

Q13 - 变体;题目贴在后面MZX最强机经的Q13变体里。
Q14 - 答案不变,注意有个干扰项:describe table= xxx,注意不能有等号。
Q15- 变形,数字好像换了,换成sum(cost)了,还用了group by, 问output,就是按每个
人分别求和。
选  Jones  20
                  Smith 120
Q16 - 变形,desired:
Lauren L
Patel    A
选intersect corr.
Q18
Q19
Q21
Q23
Q25 – 变体No和no改变位置,Belt = no. 选2
Q27
Q29
Q30 – 换单词,把product变成book. 答案不变
Q37 – 变形,给了code用的except all,问output?
选 output :
Chang
Chang
Lauren       
Q38 – 变形,4和10换位置,选result = 0
Q39 - 变形bicycles 和shoes 换了位置, 选Mv is bicycles
Q40
Q41 – 变形,给具体log来判断,还是选择mlogic
        Log 大概长这样
xxxx(PRODUCT):  Beginning execution.
xxxx(PRODUCT):  Parameter MV has value tents
Q43 – 变形;变成desire Jones 100, 选项选having avg(cost) < ()
Q44- 变形:
(1)        题目说要select table with columns name ended “Date” in the library “ORION”,选项差不多,选 dictionary.columns。
(2)        Sas 官网给的Sample 题,里面第5题,考的原题。
Q45 – 变形:3个选项用具体code给出的,选项的顺序变了,不选first.customer_id,因为没有sort。选剩下那俩。
Q47 - 单词换成Monday了,其他不变。
Q48 - 把want改成别的词了,其他不变。
        Where HireDate = “&Date”d
Q49
Q53,变形,多选题,题目中有提示说选2个。选的reduce cpu, reduce I/O (没有increase memory的选项)。
Q54
Q55,变形,desired的output里面删掉了year 2012那行,选 left join
Q58,题目类似,就选 is not missing
Q60,变形,题目中means和print互换位置,选proc print only。
Q62,--》变成了 !!!,inside换成in,outside换成out,其他不变。
Q63,变形,给code var weight height %cols1; 问输出什么变量?选weight height name age (顺序要和题中给的一样,这个有干扰项是height在weight之前)

3道填空
(1). ASK: SAS log 显示三个global macro variables,如何在Log 中輸出global macro variables
ANS: %put_GLOBAL_
FIB: _GLOBAL
(2) ASK: outer union corr让你再填个 keyword. 能和 outer union 一起用的
FIB:corr
(3) Given 2 Data Set
ONE
Name Year
Joyce         9
John         4
John         2
Jane         6
Thomas         8

TWO
Name   Age(不需要理會)
Joyce        
John
Robert
Jeff

The following SAS program is submitted:
select Name, avg(Year) as average
from WORK.ONE
Except Corr
WORK.TWO
…………..
quit;
(6+8) / 2 = 7
ANS: Average of  7
FIB: 7
官方SAMPLE 9道题
Q2原题;正确选项是Coalesce + ON
Q5原题;正确选项是NOBS + dictionary.tables

板凳
vivian1129m 发表于 2019-6-29 14:08:59
SAS ADVANCED 質素機經 by mikeleung110
新題庫updated by 02.Jan.2018 by MZX

ASK: A Data has 2000million observations and 300 Character variables
ASK:Compress=YES
FIB:YES
OR 選擇題
A COMPRESS=YES
B COMPRESS=HEX
C COMPRESS=BIN
D COMPRESS=NUM
ANS:A

Q:FCMP 选择题
proc fcmp outlib=sasuser.funcs.trial;

endsub;
options ____cmplib_____=sasuser.funcs;
data null;

run;

ANS: cmplib

选择题原题
Q:What option force the use of a specific index from dataset?
Ans: IDXNAME


Q:MACRO选择题
%let this_year=%substr(&sysdate9, 6);
%let next_year=&this_year+1;
%let check_year=%eval(&next_year<2016);
%put two years after this year is &next_year+1;
%put check_year is &check_year;
Assume system time is 01Jan2013, what is the output?

ANS: Two years after this year is 2013+1+1
check_year is 1

Q:Multi-array选择题(记住output)
Array multi{1:2, 2}(1,2);
Do i=1 to 2;
Do j=1 to 2;
Output=multi{I,j};
What are the corresponding values of i, j, and output.

A 2*2 multi-array, only two initial values, so the array is following

i  j output
1 1 1
1 2 2
2 1 .
2 2 .

Q:Pagesize info
Which of proc can check the pagesize info?
A. Proc Contents
B. Proc print
C. Proc report
D. Proc catalog

ANS:A

变体:选项改变了表达方式
Q: Pagesize Info
A. Content procedure
B. Catalog procedure
C. Print procedure
D. Report procedure


Q: KEEP&DROP statement and option Efficiency
A data set has 300,000 observations, 20 character variables, 50 numeric variables. We need 5 character
variables and 7 numeric variables, which one is the most efficient:
A. Drop=option in data step
B. KEEP=option in data step
C. Keep =option in set statement
D. Keep statement

Answer: Keep=option in set statement. With it the system only read the desired variables.



Q45 变形 选择题
(i)
Given data sets and SQL code with Select Distinct statement, which one has the same output.
The correct answer is proc SORT with Nodupkey, and with an option(drop=XXX).
Besides, BY variable cannot have the descending option, because in the SQL procedure, ORDER BY
statement is in ascending order. So choose the answer like following:

proc sort data=XXX
out=work.sorted (drop=xxx) nodupkey;
by order_var;
run;

IF First.Customer_ID choice doesn’t sort the data first, so cannot be used.

这道题的原题模式我尽量记下来了

WORK.SALES

ClientID        Name        Sales
400        xxx        00000
100        Xxx        …
200        Xxx        …
100        Xxx        …
300        Xxx        …
400        Xxx        …
100
……        Xxx        …

SAS program is submitted: (应该没记错...)
proc sql;
select distinct
ClientID
Name
from Sales;
order by ClientID;
run;

Output:
ClientID        Name
100        Xxx
200        Xxx
300        Xxx
400        xxx

A. proc sort data = Sales  out = work.sorted (drop Sales);
        by ClientID;
     run;
B. proc sort data = Sales  out = work.sorted nodupkey;
        by ClientID;
     run;
C. proc sort data = Sales  out = work.sorted (drop Sales) nodupkey;
        by ClientID;
     run;
D. proc sort data = Sales  out = work.sorted (drop Sales) nodupkey;
        by descending ClientID;
     run;

我选C. 感觉机经里面也是这个意思。
正确答案具备以下特点:
1.        有(drop Sales),可以看到output里已经没有Sales
2.        有nodupkey, 符合题目给的SAS code - “proc sql; select distinct…”,创造unique key
3.        给的code和output都能看出是按照ascending ClientID排列。D肯定错。


Q:Using View
Data finance .newdata/view=finance.newdata;
Infile<fileref>;
<Data step statements>;
run;

Submit the above code and create a data step view, then we need to use this view in the PROC MEANS
procedure, which one to use:

A. Proc Means view=finance.newdata;
B. Proc Means data= finance.newdata/view= finance.newdata;
C. Proc means data finance.newdata/view
D. Proc means data= finance.newdata

Answer: D. proc means data=dataset_name. The same way as to use a normal data set.
选没有view最短的那项

Q:MACRO
Given data set and macro program, choose missing correct code
A. &Num=California
B. call symputx(‘Num’, California)
有个干扰项是symputx(‘Num’, California),别漏了call
Answer: B

Q: left join and in-line view
Product
Product_id Product
1                1001
2                1002
3                1003
Sales
Product_id Sales
3                100
1                200
5                100
1                200
3                100
1                100

Proc sql;
select p.product, s.totalsales
from product as p
left join
(select product_id, sum(sales) as totalsales
from sales
group by product_id) as s
on p.product_id=s.product_id;
quit;
What is the output?
Answer:
Product Totalsales
1001 500
1002 .
1003 200


Q: in-line view
给了一段code 明确告知in-line view 中给定的condition 有
multiply observations satisfied the condition, 问program 运行结果。

Q:
答案是运行出错没有结果,因为in-line view return multiple results.
Ask why program failed,
答案order by statement can't be used inside of an in-line view;
注意干扰项:order by cannot be used in a query where there is an in-line view.


Q: When would it be most efficient to use multiple SET statements in the DATA Step?

A.        One file has large amount of rows of data, another one only has small number of data
Index is used as key (这句表述我不太确定) and大的dataset 里有index

B.        Both files have large amount of rows of data
Index is used as key

C.        One file has large amount of rows of data, another one only has small number of data
Index is NOT used as key

D.        Both files have large amount of rows of data
Index is NOT used as key

zwl199464说:我觉得这道题是A 主要是根据set 和 key option 在书中的描述 不过不是很确定 望指正
MZX选了A 不确定。
我也选A了


Q:没给出具体数据,但说了关于这两个数据集的一些限定条件。要选出inactive_date 为missing 时候的observation。题目是
prol sql;
Select *
From dataset1 A
Full join dataset2 B
On A.ID = B.ID
Where inactive_date is missing;
问 data dataset3;
merge dataset1 (In=Ina)
dataset2 (In=Inb);
By ID;
<insert statement>;
选项有 A: where inactive_date is missing and (Ina and Inb)
B: where inactive_date is missing and (Ina or Inb)
C: if inactive_date is missing and (ina and inb)
D: If inactive_date ne .

MZX选择C 不确定
XM  (07May2019): 我选了B,就是or那个。因为用的是full join.
我也选的B,题目是full join
感觉这题是有变体的,大家要看好full join还是merge或者其他join方式


Q: 考in line view
proc sql;
create table forecast as
select a.*, b.sales
from actual a, _________
where a.dept=b.dept;
quit;
ANS:
(select avg(revenue) as average
from Budegt
group by 1)  b
MZX注释:考的是括号的位置,记清即可
XM  (07May2019):里面有干扰项,
select (avg(revenue) as average
from Budegt
group by 1 )  b
还有俩干扰项用的create,比如
(create avg(revenue) as average
from Budegt
group by 1)  b
有内容在括号外的可以快速排除,剩下两个(select...)(create…),选 select那个


Version1:什么样的index can only be set up with DATASET procedure.
A: index centiles can be updated.
B: 可以有mutiple index ?
C: index只有numeric ?
D:index 可以包括missing value
MZX选A 不确定
我也选A

报纸
vivian1129m 发表于 2019-6-29 14:10:58
我考的原题如下:
Q:What characteristic of index can only be set by creating index with DATASET process?
A. When index centile upgraded
B. The variable of index is required to be unique
C. Index include many variables
D. Index allows to have missing value.



Verision 1: 用where statement 怎样的index 最有效?我选择了index that disqualify most variables
Verision 2:一个observation 很多的dataset,。问选什么index 最好
我比较犹豫的两个选项是
A. XXXX
B. index qualify most variabes
C: index can disqualify most variables.
D: a composite index
MZX选C 不确定
我选了C

我考的原题如下:
Q:When searching in a large dataset with multiple indexes using Where statement, which is the best index to use?
A. an index disqualify as many as observations
B. an index includes as many as observations
C. composite index
D. index with a numeric variable
我个人认为composite index不一定是最好的index,关键在于放在一起作composite的variable/column能不能做到unique。
比较好的composite index例子,姓名+生日
比较不好的composite index 例子,姓名+性别(同名同性别的人可能很多啊)
所以按这个思路A比较可行。



SAS最强机经 by MZX

Q13 变形

我考试的时候是WORK.ONE有unsorted ID, 有时是WORK.TWO但道理一样。
原来的dataset Unsorted, Output里面的ID都被sort了。
正确答案:有FULL JOIN+coalesce


質素机经也提到这题:是同一道题
Q:给了两组data并给出了output,让选择能生成同样output的code.注意到数据one没有sort 而output中ID是sort过的。
A. Data Set MERGE; by Var;
B 和 C都是明显错
D.PROC Sql 的FULL JOIN+coalesce 但没有order by
ANS:MZX选D(PS.我不知道但没有order by是什么意思,考试选项如上,是有order by的)




我考的原题:针对proc sort问题里的(2)
Q:给一个dataset + 一个output问怎样generate same output?
Dataset里面包含多个相同Customer_ID
Customer_ID        Name        Sales
100        aaa       
100        aaa       
200        bbb       
200        bbb       
500        ccc       
               

Output
Customer_ID        Name        Sales
100        aaa       
100        aaa       
200        bbb       

A. data xxx;
set xxx;
by customer_ID;
if last.customer_id then output;
B. proc sort data=xxx out=xxx Nodup;
by customer_ID;
C. proc sort data=xxx out=xxx Nodupkey;
by customer_ID;
D. data xxx;
set xxx;
order by customer_ID;(没有group by)
答案选C
这道题不确定D具体是怎么写的,反正是很普通的create dataset。只记得好像没有group by
判断的方法:last.var肯定错了,剩下两个proc sort其中一个的nodupkey写错了,那就选了剩下那个。

地板
vivian1129m 发表于 2019-6-29 14:21:45
前面提到的Q13变形,出自SAS最强机经 by MZXSAS最强机经 by MZX
Q13 变形

我考试的时候是WORK.ONE有unsorted ID, 有时是WORK.TWO但道理一样。
原来的dataset Unsorted, Output里面的ID都被sort了。
正确答案:有FULL JOIN+coalesce

图po在这里

Q13变形.png (76.7 KB)

Q13变形.png

7
vivian1129m 发表于 2019-6-30 00:42:58
質素机经也提到这题:是同一道题
Q:给了两组data并给出了output,让选择能生成同样output的code.注意到数据one没有sort 而output中ID是sort过的。
A. Data Set MERGE; by Var;
B 和 C都是明显错
D.PROC Sql 的FULL JOIN+coalesce 但没有order by
ANS:MZX选D(PS.我不知道但没有order by是什么意思,考试选项如上,是有order by的)

Q13变形2.png (60.28 KB)

Q13变形2.png

8
xayzzsr 发表于 2019-6-30 06:42:00
同学,你用的我考试分享应该尊重一下我的劳动成果吧。 你也是在国外留学,引用别人的东西难道不应该加ref么?我能理解你这种无私的精神,还是还是希望你可以尊重我的劳动成果。 而且我在曼城考的试而不是在伦敦。谢谢

9
kevinzd001 发表于 2019-7-12 14:13:04
感谢上传,正在学习中,有一定的sas基础,但是SQL看了看一脸懵逼

10
akang66 发表于 2019-7-31 21:00:38
谢谢楼主!昨天7月30号北美顺利通过 sas advanced 考试,楼主的机经几乎完全覆盖!同时也感谢群里的大神们总结的质素机经,最强机经!

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-2-17 17:08