OCP-1Z0-051-V9.02-112题
来源:互联网 发布:gt610数据 编辑:程序博客网 时间:2024/05/19 23:54
112. View the Exhibit and examine the structure of the PROMOTIONS table.
Evaluate the following SQL statement:
SQL>SELECT promo_category, AVG(promo_cost) Avg_Cost, AVG(promo_cost)*.25 Avg_Overhead
FROM promotions
WHERE UPPER(promo_category) IN ('TV', 'INTERNET','POST')
GROUP BY Avg_Cost
ORDER BY Avg_Overhead;
The above query generates an error on execution.
Which clause in the above SQL statement causes the error?
A. WHERE
B. SELECT
C. GROUP BY
D. ORDER BY
Answer: C
答案解析:
group by不能跟列别名
sh@TEST0924> SELECT promo_category, AVG(promo_cost) Avg_Cost, AVG(promo_cost)*.25 Avg_Overhead
2 FROM promotions
3 WHERE UPPER(promo_category) IN ('TV', 'INTERNET','POST')
4 GROUP BY Avg_Cost
5 ORDER BY Avg_Overhead;
GROUP BY Avg_Cost
*
ERROR at line 4:
ORA-00904: "AVG_COST": invalid identifier
- OCP-1Z0-051-V9.02-112题
- OCP-1Z0-051-V9.02-1题
- OCP-1Z0-051-V9.02-1题
- OCP-1Z0-051-V9.02-1题
- OCP-1Z0-051-V9.02-11题
- OCP-1Z0-051-V9.02-12题
- OCP-1Z0-051-V9.02-14题
- OCP-1Z0-051-V9.02-15题
- OCP-1Z0-051-V9.02-17题
- OCP-1Z0-051-V9.02-18题
- OCP-1Z0-051-V9.02-21题
- OCP-1Z0-051-V9.02-118题
- OCP-1Z0-051-V9.02-120题
- OCP-1Z0-051-V9.02-32题
- OCP-1Z0-051-V9.02-33题
- OCP-1Z0-051-V9.02-93题
- OCP-1Z0-051-V9.02-94题
- OCP-1Z0-051-V9.02-95题
- opencv的配置信息暂存
- web-sso 系统集成 单点登录
- js控制iframe的高度/宽度,自适应内容
- Covert VirtualBox vdi or vmdk to KVM qcow
- CSS、jQuery实现放大缩小动画效果
- OCP-1Z0-051-V9.02-112题
- objective-c检测网络状态
- IOS 地图坐标转换相关
- uva 10913 - Walking on a Grid(记忆化)
- vmdk修复(VERR_VD_VMDK_INVALID_HEADER错误)
- ArcGIS server10.1发布FeatureAccess失败
- 线性代数学习笔记
- Merge Into 语句代替Insert/Update在Oracle中的应用
- java.lang.OutOfMemoryError: Java heap space什么原因