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. 【python 】Requests 库学习笔记

    概览 实例引入 import requests response = requests.get('https://www.baidu.com/') print(type(response)) prin ...

  2. 智能指针--C++

    智能指针(一):STL auto_ptr实现原理 智能指针实际上是一个类(class),里面封装了一个指针.它的用处是啥呢? 指针与内存 说到指针自然涉及到内存.我们如果是在堆栈(stack)中分配了 ...

  3. css常用属性总结:文本属性中的text-indent

    在网页中的文本格式中最重要的效果之一就是段落的首行文本缩进,尤其在新闻类页面,使用text-indent,任何元素都可以让首行以给定的长度缩进, 长度甚至可以是负数,这一属性的最常用方式就是段落的首行 ...

  4. JavaScript中call,apply,bind方法

    why?call,apply,bind干什么的?为什么要学这个? 一般用来指定this的环境,在没有学之前,通常会有这些问题. var a = { user:"追梦子", fn:f ...

  5. Thrift 实现 JAVA,PHP,C#,Python 互相通信

    Thrift介绍   https://www.ibm.com/developerworks/cn/java/j-lo-apachethrift/index.html 首先需要下载 Thrift.exe ...

  6. set 续4

    ---------siwuxie095                 批处理简易计算器 @echo off ::设置窗口标题 title DOS 简易计算器 ::设置窗口大小 ::设置窗口颜色 co ...

  7. 关于调试php的socket服务端中遇到的问题及解决办法

    今天终于把socket的服务端解决了,期间遇到了很多问题呢~ 1.用cmd运行php的问题: 2.socket_create()函数未定义问题: 3.查看端口的问题. 以下逐一说说解决办法: 1.在c ...

  8. mybatis sql语句等日志打印

    加settings <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE configuration ...

  9. 优化 resolv.conf

    DNS lookup 在把域名解析成 IP 过程中耽误了不少时间,尤其是访问比较复杂的网站的时候,比如某个页面包含多个 url,一次请求需要做多次 DNS 解析,并且从用户浏览器到 DNS serve ...

  10. PKUWC2019 真·游记

    由于我这个大傻逼考试结果实在是没法看,所以这篇游记将尽可能略去和考试有关的内容,变成一篇真正的游记…… 接下来的内容中将会出现各种旅游攻略,寻求干货的同学可以提前左转了. Day -7 学考终于结束了 ...