SAS_Adv最强机经.pdf

SAS_Adv最强机经.pdf

ID:48024644

大小:311.63 KB

页数:25页

时间:2020-01-23

SAS_Adv最强机经.pdf_第1页
SAS_Adv最强机经.pdf_第2页
SAS_Adv最强机经.pdf_第3页
SAS_Adv最强机经.pdf_第4页
SAS_Adv最强机经.pdf_第5页
资源描述:

《SAS_Adv最强机经.pdf》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、我的机经补充leftjoinandin-lineviewProductProduct_idProduct110012100231003SalesProduct_idSales310012005100120031001100Procsql;Selectp.products.totalsalesFromproductaspleftjoin(selectsum(sales)astotalsalesfromsalesass)onp.product_id=s.product_id;quit;Whatistheoutput?Answer:ProductTotalsales10015001

2、002.1003200No.4from63题库干扰选项:intogroupseparate=’,’正确选项into:GROUPSseparatedby','关于view考了三道题,(1)哪个个view的命名code正确?dataxxx/view=xxx(view和dataset的命名必须一样)(2)q.11变型,改了dataset命名,并且只生成一个dataset。选项原理木有改。(2)生成了view之后在procmean中如何引用?和普通dataset一样。(后面机经总结中也有)Procsortdata=xxxNodupkey;Byvar;考了三道(1)q.45题目明确un

3、sorteddataset,所以first那个不能用(2)给了dataset和desiredoutput,要求选code。发现是要生成uniquevalueofkeyvariable.只有procsortnodupkey;byvar的选项对,有干扰选项procsortnodup;byvar;(3)后面机经中提到的q.45变型Iin-lineview另外还考了一道题,给了一段code明确告知in-lineview中给定的condition有multiplyobservationssatisfiedthecondition,问program运行结果。答案是运行出错没有结果,因为i

4、n-lineviewreturnmultipleresults.考到的填空题目(后面论坛机经总结中有详细题目)outunioncorraverageof…is7%put_Global_;HashAlpha人大经济论坛机经总结NewquestionsSQL1.填空Datathree;setonetwo;run;procAppendbase=onedata=two;run;procsql;select*fromoneOUTUNIONCORRselect*fromtwo;quit;2.Mergestatementindataprocedureprocsql;FULLjoinw

5、ithcoalesce()function63题库q.13变型Note:beforeusingmergeprocedure,weneedtosortvariablefirst.Inthequestion,onetableisunsorted,sowecannotusemergeprocedure.3.in-lineview考了两道题(i)procsql;createtableforecastasselecta.*,b.salesfromactuala,_________wherea.dept=b.dept;quit;Answer:(selectavg(revenue)asav

6、eragefromBudegtgroupby1)bNote,ifselectisoutoftheparentheses,thenitiswrong.Beside,in-lineviewcannotuseorderbystatement.e.g.thefollowingcodeiswrongselect(avg(revenue)asaveragefromBudegtgroupby1)b(ii)givenafailedprogram,askthereasonoffailure.Procsql;selectJobcode,Salary,(selectavg(Salary)fromW

7、ORK.PILOTSorderbyJobcode)asAvgfromWORK.PILOTSorderbyID;quit;Answer:OrderBystatementcannotbeusedinsideofanin-lineview.Warning:Thereisanotherchoicesaysthatifusingin-lineviewthenwecannotuseOrderBystatement.Thisisnottrue.TheORDERBYIDstatementintheoutsidequer

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。