博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【ocp-12c】最新Oracle OCP-071考试题库(44题)
阅读量:6929 次
发布时间:2019-06-27

本文共 990 字,大约阅读时间需要 3 分钟。

44、(9-12)choose all that apply

View the Exhibit and examine the details of the ORDER_ITEMS table.

Evaluate the following SQL statements:

Statement 1:

SELECT MAX(unit_price*quantity) "Maximum Order"

FROM order_items;

Statement 2:

SELECT MAX(unit_price*quantity) "Maximum Order"

FROM order_items

GROUP BY order_id;

Which statements are true regarding the output of these SQL statements? (Choose all that apply.)

A) Both statements would ignore NULL values for the UNIT_PRICE and QUANTITY columns.

B) Statement 1 would return only one row of output.

C) Both the statements would give the same output.

D) Statement 2 would return multiple rows of output.

E) Statement 1 would not return any row because the GROUP BY clause is missing.

Anser:ABD

(解析:对于 null 值,Oracle 计算的时候结果为空,但是在求最大值的时候,会忽略)

SQL> select sal*comm from emp;

SAL*COMM

----------

480000

625000

1750000

SQL> select max(sal*comm) from emp;

MAX(SAL*COMM)

-------------

 

1750000

转载于:https://www.cnblogs.com/cnblogs5359/p/10442683.html

你可能感兴趣的文章
mysql group_concat方法用法
查看>>
[六省联考2017]摧毁“树状图”
查看>>
利用自然数的标准分解证明可数集合的所有有限子集形成的集合是可数集
查看>>
Excel中SEARCH和FIND函数的区别
查看>>
js继承综合
查看>>
[转译]5种方法提高你网站的登录体验
查看>>
关于Grunt
查看>>
linux基础名词
查看>>
(通用)Android App代码混淆终极解决方案【转】
查看>>
《平凡的世界》
查看>>
Mvc Filter
查看>>
数据绑定流程分析
查看>>
hibernate 实现多表连接查询(转载)
查看>>
对一个新知识领域的学习路径
查看>>
ios 获取当前时间
查看>>
算法之求质数(Java语言)
查看>>
Python之旅.第三章.函数
查看>>
WebService学习总结(一)
查看>>
Node.js安装及环境配置之Windows篇
查看>>
初学css为博客园文章某个超链接添加 icon
查看>>