OCP-1Z0-051-2015-4题
来源:互联网 发布:最新炒股软件排名 编辑:程序博客网 时间:2024/04/30 11:27
See the Exhibit and examine the structure and data in the INVOICE table:
Exhibit:
Which two SQL statements would executes successfully? (Choose two.)
A. SELECT MAX(inv_date),MIN(cust_id) FROM invoice;
B. SELECT MAX(AVG(SYSDATE - inv_date)) FROM invoice;
C. SELECT (AVG(inv_date) FROM invoice;
D. SELECT AVG(inv_date - SYSDATE),AVG(inv_amt) FROM invoice;
Answer: A,D
Explanation:
引用官方文档:
This function takes as an argument anynumeric data type or any nonnumeric data
type that can be implicitly converted to anumeric data type. The function returns the
same data type as the numeric data type ofthe argument.
A对,
SELECT MAX (column_name) / MIN (column_name)
FROM table_name
说明:列column_name中的数据可以是数值、字符串或是日期时间数据类型。MAX()/MIN()函数将返回与被传递的列同一数据类型的单一值。
B错,选项中avg得到单一结果,无法使用max函数
C错:AVG只能应用于数值类型
D对,选项中inv_date-sysdate得到数字,所以能使用avg- OCP-1Z0-051-2015-4题
- OCP-1Z0-051-2015-1题
- OCP-1Z0-051-2015-2题
- OCP-1Z0-051-2015-3题
- OCP-1Z0-051-2015-5题
- OCP-1Z0-051-2015-6题
- OCP-1Z0-051-2015-7题
- OCP-1Z0-051-2015-8题
- OCP-1Z0-051-2015-9题
- OCP-1Z0-051-2015-10题
- OCP-1Z0-051-2015-11题
- OCP-1Z0-051-2015-12题
- OCP-1Z0-051-2015-13题
- OCP-1Z0-051-2015-14题
- OCP-1Z0-051-2015-15题
- OCP-1Z0-051-2015-16题
- OCP-1Z0-051-2015-17题
- OCP-1Z0-051-2015-18题
- C#中委托的调用
- hdu2059 龟兔赛跑 (还没做)
- 反尼姆游戏
- 02-线性结构2. 一元多项式求导 (25)
- Android Bitmap那些事之如何优化内存
- OCP-1Z0-051-2015-4题
- redis主从配置及主从切换
- golang beego框架使用有感
- 每天一点hadoop第七篇 HDFS(三)
- cocos2dx lua 代码加密
- C中运算符优先级
- 第二周-图书馆的书
- 肺癌晚期丈夫不敢死 只为让妻子落户深圳
- 图的邻接表(广度优先遍历,深度优先遍历,最小生成树(Kruskal算法))