在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → SAS ADV最强机经

SAS ADV最强机经

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:0.30M
  • 下载次数:1
  • 浏览次数:187
  • 发布时间:2020-08-09
  • 实例类别:一般编程问题
  • 发 布 人:robot666
  • 文件格式:.pdf
  • 所需积分:2
 

实例介绍

【实例简介】
SAS_Adv最强机经~截止至2016年10月亲测有效。配合63题一起看非常有效
2. Merge statement in data procedure f proc sql; full join with coalesce( function 3题库q13变型 Note: before using merge procedure, we need to sort variable first n the question, one table is unsorted, so we cannot use merge procedure 3.in- line view考了两道题 proc sc create table forecast as select a * bsales from actual a where a dept=b dept qui answer: (select avg(revenue)as average from Budegt group by 1)b Note, if select is out of the parentheses, then it is wrong. Beside, in-line view cannot use order by statement e. g. the following code is wrong select( avg(revenue)as average from budegt group by 1)b (ii) given a failed program, ask the reason of failure Proc select Jobcode Sala (select avg(Salary) from WORK. PILOtS order by Jobcode)as Avg from WORK. PILOTS order by ID Answer: Order by statement cannot be used inside of an in-line view This is not true. The ORDER BY ID statement in the outside query is (K nnot use Order By statement Warning: There is another choice says that if using in-line view then we ca 4. Horizontal join set operator (i) right join Two data sets Work. One year 2001800 2001500 2003700 Work. two year profil 2001100 2002200 proc sql; select sum(profit) from one right join two on one year-two year; quit what is the output: 400 A.100 B.300 C.400 D.500 There are two 2001 year in the left set( Work. one), so the joined data set has three observations for the variable profit: 100, 100, 200 Sum(profit)=400 5. Vertical join set operator, it is about except operator, given two data sets ask about the output. Choose the answer with one answer Charli Omar 6. nested query and inner join given two data sets and SQL code, ask for the output Choose the answer with Thomas, Jones, Smith, but no Adam. Besides, there is a descreasing option in the ode so the sales need to be in decreasing order 7. Outer Join except corr, what is the output EXO E Xce Intersect corr Outerunion corr Union corr MACRO given data set and macro program, choose missing correct code A &Num=California B call symputx(&Num, Ca alifornia Answer: B %let this year=%substr(&sysdate9, 6): %let next year=&this year+I %let check year=%eval( &next year<2016) %oput two years after this year is &next year+1 %oput check year is &check year Assume system time is o1 Jan2013, what is the output? Answer two years after this year is 2013+1+1 heck year is I 3.% put option填空 %olet a=1 olet b=2 %macro test let c=4: %odo i=1 %to 3 %letd&i=123&i %end %oput % mend %olet c=3 output 「xxx]b=2 xxx]c=4 SAS log shows three global macro variables, so we should use %put Global 4.引用 macro in a Where clause填空 given two datasets, variables: state ID and state, and state ID and cit %olet selection-North Carolina proc sql step; where sstate= "&selection 5. macro variable with macro trigger signs Output title"XXX A&M XXX", which macro definition should be used A title %osysfundc(XXX A&M XXX") B title %ostr("XXX A&MXXX) C. title onrstr(XXⅩA&MⅩⅩX”) D title %quote(XXX A&M XXX) Answer: C %nrstr(.), to mask macro trigger sign Advanced tech Hash object填空 the first part of code gives Key: valuepair definition, the variables are somekey and some Alpha, we need to fill in the hash object definition Some. definedata(“ somealpha”); e. g in the guid book declare has Goal; Goal. definekey(“ QtrNum”); Goal. definedata("GoalAmount") Goal. definedoneo 2. repeated need a local data set, what kind of effect does sasfile statement has to the global statement Answer: reduce CPU, reduce 1/O, increase memory 3. IDXWHERE指定必须用 index,但是具体用哪个SAS可以自己选择 IDXNAME=.(instruc SAs to use a specific index for where processing 4.FCMP填空 proc fcmp outlib-sasuser funcs trial endsub options cmpld -sasuser.funcs; data null. run 3. Compress填空 A data set has 2000 million observations and 300 character variables, what is the correct way to compress Compress- YES(Char is also OK.) 4. Efficiency of If-then/Else and where clauses A compressed data set has 200,000 observations, 300 variables. We need 20%o of character observations what method can minimize computer resource usage? A. If-then/Else clause B. Case C. Where D Answer: Where clause is more efficient, since it only read 20% observations as the condition required 5. KeeP&DRoP statement and option Efficiency a data set ahs 300.000 observations. 20 character variables. 50 numeric variables. We need 5 character variables and 7 numeric variables. which one is the most e fficient 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 6. multi array Array multi(1: 2, 2)(1, 2); Do i=l to 2. Do i-l to 2 Output=multi L,ii What is the corresponding values of i,j, and output Answer A 2*2 multi-array, only two initial values, so the array is following that means outpu 7. Using View Data company. newdata/view=company. newdata Infilesfilere l. <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=company. newdata B. Proc Means data=company. newdata/view=company. newdata C. Proc means data company. newdata/view D. Proc means data=company. newdata Answer: D. proc means data=dataset name. The same way as to use a normal data set. 另外view的考点还有63题库q.11,q.29 8. Format search libral given two format with the same name SGender, one store in Mylib, and the other in librar P c prI USing the format $Gender. From the desired output, we can tell that the format in Mylib is used Options fmtsearch- Which statement should be filled in here? A fmsearch needed B. fmsearch-(mylib, library C. insearch=(library, mylib) D. fm Answer: B. With this option, system first check the work library, then MYLIB, and then LIBRaRY Noted is wrong Without noting fmsearch options, the default search order is (I work. formats 2 library. formats 3 mylib formats) If specified as D, then the search order is (1. Work. formats 2. library. formats 3. mylib) If specified as b. then the search order is (I. Work. formats 2. mylib 3. library. formats 9. Check pagesize information using Proc Contents procedure (thyE* given output and choose code) Which is equivalent to Describe Table Var statement in SQL procedure Note:迷惑选项 describe table=var; BASE 1.填空 given data sets and program code, calculated the returned average value from the subquery Avg(Num)=avg(6, 8)=7 63题库及变型 q,9变型 Given the sas data set WORK transact: R Cost Ship SMITH 200 50 SMITH 400 20 JONES 100 10 SMITH 600 100 JONES 100 The following output is desired R JONES 105 JONES 105 SMITH 105 SMITH 105 SMITH 105 Which SQl statement was used? A select Rep, min(Cost-Ship) from WORK. TRANSACT der by ret B select Rep, min(Cost, Ship) as Min from WORK TRANSaCt summary by rep order by Rep select Rep, min(Cost, Ship from WORK. TRaNSaCt group by Rep rder by r D select Rep, min( Cost- Ship) Trom WORK TRaNsact group by Rep Rep answer: A q10变型 The following SAS program is submitted Volet Value=1l olet Add=5 %let Newval=%eval( &value/&add %oput &Newval What is the value of the macro variable newval when the %put statement executes? A.0.5 B.2 C.1.8 D.1 Answer: 2 q11变型 题干叙述有变动,但是答案不变 【实例截图】
【核心代码】

标签:

实例下载地址

SAS ADV最强机经

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警