【ocp-12c】最新Oracle OCP-071考试题库(37题)
19.choose the best answer
View the Exhibit and examine the structure of the PROMOTIONS table.

Evaluate the following SQL statement:
SQL>SELECT promo_name,CASE
WHEN promo_cost>=(SELECT AVG(promo_cost)
FROM promotions
WHERE promo_category= 'TV')
THEN 'HIGH'
ELSE 'LOW'
END COST_REMARK
FROM promotions;
Which statement is true regarding the outcome of the above query?
A) It shows COST_REMARK for all the promos in the promo category 'TV' .
B) It produces an error because subqueries cannot be used with the CASE expression.
C) It shows COST_REMARK for all the promos in the table.
D) It produces an error because the subquery gives an error.
Answer:C
(解析:category 'TV'只是判定 promo_cost 的一个条件,显示的是所有 category 的内容。
使用如下语句验证:
SELECT promo_name,promo_category,CASE
WHEN promo_cost>=(SELECT AVG(promo_cost)
FROM promotions
WHERE promo_category= 'TV')
THEN 'HIGH'
ELSE 'LOW'
END COST_REMARK
FROM promotions
where rownum < 30;
)
【ocp-12c】最新Oracle OCP-071考试题库(37题)的更多相关文章
- 【OCP题库-12c】最新CUUG OCP 071考试题库(72题)
72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(71题)
71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(70题)
70.(31-2)choose the best answer: View the Exhibit and examine the structure of the Book table. The B ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(69题)
69.(31-1)choose the best answer: Evaluate the following query: SELECT INTERVAL '300' MONTH, INTERVAL ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(68题)
68.(29-13)choose two: Which two statements are true? (Choose two.) A) DICTIONARY is a view that cont ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(67题)
67.(25-8)choose the best answer: View the Exhibit and examine the structure of CUSTOMERS table. Eval ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(66题)
66.(22-19)choose two Examine the structure proposed for the TRANSACTIONS table: Which two statements ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(65题)
65.(22-16) choose the best answer: The CUSTOMERS table has the following structure: You need to writ ...
- OCP 12c最新考试题库及答案(071-2)
2019-02-12 16:23:54 2.(4-7) choose the best answer:You need to display the first names of all cust ...
- 【OCP-12c】2019年CUUG OCP 071考试题库(80题)
80.View the exhibit and examine the structure in ORDERS and ORDER_ITEMS tables. You need to create a ...
随机推荐
- curl常用设置-涉及超时相关
curl_easy_setopt( curl, CURLOPT_VERBOSE, 1L ); //在屏幕打印请求连接过程和返回http数据 curl_easy_setopt( curl, CURLOP ...
- C#中遍历各类数据集合的方法总结
C#中遍历各类数据集合的方法总结: 1.枚举类型 //遍历枚举类型Sample的各个枚举名称 foreach (string sp in Enum.GetNames(typeof(Sample))) ...
- 【331】python 下载文件:wget / urllib
参考:python下载文件的三种方法(去掉-) 方法一:wget import wget, os # 设置下载路径 os.chdir(r"D:/tmp") url="ht ...
- gorm中自己写sql的方法实现
type Result struct { Total int } var result Result //当天修改作业的总时间:分钟 dao.DB(dao.HomeworkTable).Raw(&qu ...
- tomcat服务编码集设置
有三处需要记住修改 截图如下效果图: 第一处,对控制台右键,选择“默认值”找到,并设置为gbk: 第二处,在conf中找到server.xml文件并设置: 第三处:找到bin文件,找到tomcat80 ...
- 用Hash Table(哈希散列表)实现统计文本每个单词重复次数(频率)
哈希表在查找方面有非常大应用价值,本文记录一下利用哈希散列表来统计文本文件中每个单词出现的重复次数,这个需求当然用NLP技术也很容易实现. 一.基本介绍 1.Hash Key值:将每个单词按照字母组成 ...
- 解决 Windows 系统使用 Homestead 运行 Laravel 本地项目响应缓慢问题
laravel-china.com: https://laravel-china.org/articles/9009/solve-the-slow-response-problem-of-window ...
- sklearn中决策树算法DesiciontTreeClassifier()调用以及sklearn自带的数据包sklearn.datasets.load_iris()的应用
决策树方法的简单调用记录一下 clf=tree.DecisionTreeClassifier() dataMat=[];labelMat=[] dataPath='D:/machinelearning ...
- unittest单元测试框架之coverage代码覆盖率统计
什么是coveage? coverage是一个检测单元测试覆盖率的工具,即检查你的测试用例是否覆盖到了所有的代码.当你通过pip install coverage成功安装完coverage后,就会在p ...
- edis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots,
edis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots ...