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

【ocp-12c】最新Oracle OCP-071考试题库(44题)的更多相关文章

  1. 【OCP题库-12c】最新CUUG OCP 071考试题库(72题)

    72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...

  2. 【OCP题库-12c】最新CUUG OCP 071考试题库(71题)

    71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) ...

  3. 【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 ...

  4. 【OCP题库-12c】最新CUUG OCP 071考试题库(69题)

    69.(31-1)choose the best answer: Evaluate the following query: SELECT INTERVAL '300' MONTH, INTERVAL ...

  5. 【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 ...

  6. 【OCP题库】最新CUUG OCP 12c 071考试题库(67题)

    67.(25-8)choose the best answer: View the Exhibit and examine the structure of CUSTOMERS table. Eval ...

  7. 【OCP题库】最新CUUG OCP 12c 071考试题库(66题)

    66.(22-19)choose two Examine the structure proposed for the TRANSACTIONS table: Which two statements ...

  8. 【OCP题库】最新CUUG OCP 12c 071考试题库(65题)

    65.(22-16) choose the best answer: The CUSTOMERS table has the following structure: You need to writ ...

  9. 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 ...

  10. 【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 ...

随机推荐

  1. ICaptureGraphBuilder2::RenderStream 智能连接方法浅析

    ICaptureGraphBuilder2::RenderStream HRESULT RenderStream( [in] const GUID *pCategory, [in] const GUI ...

  2. android处理Back键Home键和Menu键事件(转)

    @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BAC ...

  3. 【转】跨DLLnew delete问题

    转两篇文章来说这个问题的 链接1:https://blog.csdn.net/notebook2001a/article/details/6647850 链接2:https://blog.csdn.n ...

  4. 7.25 6figting!

    TEXT 82 Proton 马来西亚宝腾汽车 A fork in the road 何去何从?(陈继龙编译) Nov 30th 2006 | HONG KONG From The Economist ...

  5. 记一次为gitlab启用CI的过程

    问题描述: 在局域网内搭了了一个gitlab,最近有需求要用CI 那时我不在 ,他们尝试了一段时间的Jenkins,但是还没有成功,我说gitlab已经有这些功能了,不用那个.于是一个人搞起来了. 从 ...

  6. python传值&值引用

    [python传值&值引用] 和其他语言不一样,传递参数的时候,python不允许程序员选择采用传值还是传引用.Python参数传递采用的肯定是“传对象引用”的方式.实际上,这种方式相当于传值 ...

  7. web和wap网站的区别 (转)

    WAP的全称是“无线应用协议(Wireless Application Protocol)”,是一种向移动终端提供互联网内容和先进增值服务的全球统一的开放式协议标准, 是简化了的无线Internet ...

  8. 第七章 二叉搜索树 (a)概述

  9. CloudStack 4.1快照测试

    目前4.1只支持存储快照,4.2能支持内快照 1. 选中实例 2. 查看实例卷 3. 创建快照 4. 通过快照创建模板 5. 查看通过快照创建的模板 6. 通过快照创建模板生成的实例 7. 自动定制创 ...

  10. Castle ActiveRecord学习(八)事务

    代码: public void UpdateThemeInfo(int id) { //事务 using (TransactionScope ctran = new TransactionScope( ...