33.choose the best answer

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

Examine the following SQL statement:

SELECT order_id, product_id, unit_price

FROM order_items

WHERE unit_price =

(SELECT MAX(unit_price)

FROM order items

GROUP BY order_id);

You want to display the PRODUCT_ID of the product that has the highest UNIT_PRICE per ORDER_ID.

What correction should be made in the above SQL statement to achieve this?

A) Replace = with the >ALL operator.

B) Replace = with the >ANY operator.

C) Remove the GROUP BY clause from the subquery and place it in the main query.

D) Replace = with the IN operator.

Answer:D

(解析:题意是希望显示每个 ORDER_ID 具有最高 UNIT_PRICE 的产品的 PROT_ID 的信息)

【12c OCP】CUUG OCP认证071考试原题解析(33)的更多相关文章

  1. 【12c OCP】CUUG OCP认证071考试原题解析(36)

    36.choose the best answer View the Exhibits and examine the structures of the PRODUCTS, SALES, and C ...

  2. 【Oracle 12c】CUUG OCP认证071考试原题解析(35)

    35.choose the best answer View the Exhibit and examine the description of the EMPLOYEES table. Evalu ...

  3. 【12c OCP】CUUG OCP认证071考试原题解析(34)

    34.choose two View the Exhibit and examine the structure of the PRODUCT_INFORMATION and INVENTORIES ...

  4. 【Oracle 12c】CUUG OCP认证071考试原题解析(32)

    32.choose the best answer View the Exhibit and examine the data in EMP and DEPT tables. In the DEPT ...

  5. 【Oracle 12c】CUUG OCP认证071考试原题解析(31)

    31.choose the best answer Which statement is true regarding the USING clause in table joins? A) It c ...

  6. 【Oracle 12c】CUUG OCP认证071考试原题解析(30)

    30.choose the best answer Examine the commands used to create DEPARTMENT_DETAILS and COURSE_DETAILS: ...

  7. 【Oracle 12c】CUUG OCP认证071考试原题解析(29)

    29.choose the best answer Evaluate the following query: SQL> SELECT promo_name || q'{'s start dat ...

  8. 【OCP认证12c题库】CUUG 071题库考试原题及答案(28)

    28.choose the best answer Evaluate the following SQL statement: SQL> SELECT promo_id, promo_categ ...

  9. 【OCP认证12c题库】CUUG 071题库考试原题及答案(27)

    27.choose two The SQL statements executed in a user session are as follows: SQL> CREATE TABLE pro ...

随机推荐

  1. D3D-GetBackBuffer &GetFrontBufferData 抓屏&D3D抓取GPU数据

    HRESULT GetBackBuffer( [in]          UINT                iSwapChain, [in]          UINT              ...

  2. Centos7手动编译安装Python3

    Python3的安装方式非常的简单,首先去到Python下载目录下载想要的Python包,这里我选择了3.6.5版本 $ wget https://www.python.org/ftp/python/ ...

  3. css常用属性总结:颜色和单位

    在css代码编写中,估计颜色和单位是必不可少的,然而在css中关于颜色和单位值的写法有很多种写法,所以有必要把它弄清楚. 颜色 当初我在初学前端的时候,就会冒出一个疑问“我该如何设置网页颜色?”,一般 ...

  4. docker 网络配置路由转发

    建好flannel 网络之后 iptables -L -n 查看 要全是accept iptables -P FORWARD ACCEPT 开启路由转发 修改/etc/sysctl.conf文件,添加 ...

  5. Spring集成Mybatis配置文件的简单理解

    详情可见官方文档http://www.mybatis.org/spring/zh/index.html 一.需要配置的对象实例 1.SqlSessionFactoryBean 在 MyBatis-Sp ...

  6. 第七章 二叉搜索树(b1)BST:查找

  7. Mac 安装Django

    首先 我电脑上的python  是 安装Django  是需要通过 pip  来安装的  最新办的python3.4 应该内置了pip  因此这里 需要下载安装pip pip是常用的Python包管理 ...

  8. Django基础学习七之如何配置django+mysql

    很久没有更新博客了,也有段时间没有持续性的学习了,感觉堕落了,今天继续开始学习吧 今天主要来学习一下在django下配置mysql的数据库和使用admin用户管理数据库 1.在project中的set ...

  9. Django基础学习六之渲染

    今天简单的介绍一下Django的template的渲染和Django的template的基本的语法 首先我们先启动一个django的shell,首先需要进入django的工程目录下启动django的s ...

  10. yum 系列(一) yum 和 rpm 常用命令

    yum 系列(一) yum 和 rpm 常用命令 一.yum 常用命令 yum 命令:http://man.linuxde.net/yum yum 是在 Fedora 和 RedHat 以及 SUSE ...