没有合适的资源?快使用搜索试试~ 我知道了~
首页SAS ADV 63题 crackman版
SAS ADV 63题 crackman版
需积分: 42 51 下载量 180 浏览量
更新于2023-03-16
评论
收藏 436KB PDF 举报
SAS_ADV_63Q_Details(by crackman) 目前最好最权威的版本,大部分题目都有解释
资源详情
资源评论
资源推荐
特别感谢 Crackman ! 部分注释来自 crackman 博客
Item 1 of 63 Mark item for review
When attempting to minimize memory usage, the
most efficient way to do group processing when
using the MEANS procedure is to use:
A.
the BY statement.
B.
GROUPBY with the NOTSORTED specification.
C.
the CLASS statement.
D.
multiple WHERE statements.
C
Item 2 of 63 Mark item for review
The SAS data set WORK.CHECK has a variable
named Id_Code in it. Which SQL statement would
create an index on this variable?
A.
create index Id_Code on WORK.CHECK;
B.
create index(Id_Code) on WORK.CHECK;
C.
make index=Id_Code from WORK.CHECK;
D.
define index(Id_Code) in WORK.CHECK;
A: prepare guide chapter 6
Item 3 of 63 Mark item for review
Given the SAS data sets:
WORK.EMPLOYEE WORK.NEWEMPLOYEE
Name Dept Names Salary
-------- ----- -------- ------
Alan Sales Michelle 50000
Michelle Sales Paresh 60000
A SAS program is submitted and
the following is written to the SAS log:
101 proc sql;
102 select dept, name
103 from WORK.EMPLOYEE
104 where name=(select names
from newemployee
where salary > 40000)
ERROR: Subquery evaluated to more than one row.
105 ;
106 quit;
What would allow the program to
successfully execute without errors?
A.
Replace the where clause with:
where EMPLOYEE.Name=(select Names delimited with ','
from WORK.NEWEMPLOYEE
where Salary > 40000);
B.
Replace line 104 with:
where EMPLOYEE.Name =ANY (select Names separated with ','
from WORK.NEWEMPLOYEE
where Salary > 40000);
C.
Replace the equal sign with the IN operator.
D.
Qualify the column names with the table names.
C: 首先分析这个原程序第 104 行,中 where name=(select names from newemployee where
salsry>40000)
原 程 序 在 执 行 过 程 , 应 先 是 执 行 子 查 询 , select names from newemployee where
salsry>40000,将返回的结果作为下一个查询的筛选条件。
在这里返回的结果 NAMES 这个变量包括了两个值 Michelle 和 Paresh,所以在执行过程出现
错误。那么应该改成 IN 或者 ANY。IN ANY 指定的是一个匹配范围,而等号必须是一个具体
匹配的值。
这里可以思考 SEPARATED WITH 这个语句,SAS 认为是错误
Item 4 of 63 Mark item for review
Given the SAS data set SASUSER.HIGHWAY:
Steering Seatbelt Speed Status Count
-------- -------- ----- ------- -----
absent No 0-29 serious 31
absent No 0-29 not 1419
absent No 30-49 serious 191
absent no 30-49 not 2004
absent no 50+ serious 216
The following SAS program is submitted:
proc sql noprint;
select distinct
Speed [_insert_SQL_clause_]
from SASUSER.HIGHWAY
;
quit;
title1 "Speed values represented are: &GROUPS";
proc print data=SASUSER.HIGHWAY;
run;
Which SQL clause stores the text 0-29,30-49,50+ in
the macro variable GROUPS?
A.
into &GROUPS
B.
into :GROUPS
C.
into :GROUPS separated by ','
D.
into &GROUPS separated by ','
C: 此题考察的是 SQL 与宏的结合。
用 SQL 语句产生宏变量,语法结构如下:
PROC SQL NOPRINT;
SELECT column1<,column2,…>
INTO :macro-variable-1<,:macro-variable-2,…>
FROM table-1 | view-1
<WHERE expression>
<other clauses>;
QUIT;
下面这个语法结构是将一变量的多个值组合在一个宏变量里面,例如:
General form, SELECT statement with INTO clause for combining values into one macro
variable:
PROC SQL NOPRINT;
SELECT column1
INTO :macro-variable-1
SEPARATED BY ‘delimiter1’
FROM table-1 | view-1
<WHERE expression>
<other clauses>;
QUIT;
回头看看题目的要求:如何将这个文本“ 0-29,30-49,50+”放在一个宏变量&GROUPS 中?
显然是采用第二个语法结构。
Item 5 of 63 Mark item for review
The SAS data set WORK.CHECK has an index
on the variable Code and the following SAS
program is submitted.
proc sort data=WORK.CHECK;
by Code;
run;
Which describes the result of submitting
the SAS program?
A.
The index on Code is deleted.
B.
The index on Code is updated.
C.
The index on Code is uneffected.
D.
The sort does not execute.
D: SORT 过程是不能对已经建立索引 INDEX 的数据集进行 SORT 或者 REPLACE,因为那样会破
坏数据集的 INDEX 文件。
当然如果非要排序,破坏 INDEX 文件,可以再后面加入一个参数 force
Item 6 of 63 Mark item for review
The table WORK.PILOTS contains the following data:
WORK.PILOTS
Id Name Jobcode Salary
--- ------ ------- ------
001 Albert PT1 50000
002 Brenda PT1 70000
003 Carl PT1 60000
004 Donna PT2 80000
005 Edward PT2 90000
006 Flora PT3 100000
The data set was summarized to include average
salary based on jobcode:
Jobcode Salary Avg
剩余63页未读,继续阅读
waterecho
- 粉丝: 1
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
- SPC统计方法基础知识.pptx
- MW全能培训汽轮机调节保安系统PPT教学课件.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0