Chinaunix首页 | 论坛 | 博客
  • 博客访问: 595463
  • 博文数量: 487
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 4916
  • 用 户 组: 普通用户
  • 注册时间: 2018-07-05 13:59
个人简介

ocp考试资料群:569933648 验证码:ocp OCP 12c 19c考试题库解析与资料群:钉钉群号:35277291

文章分类

全部博文(487)

文章存档

2023年(37)

2021年(151)

2020年(37)

2019年(222)

2018年(38)

我的朋友

分类: Oracle

2019-02-25 09:44:53

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 的信息)
阅读(759) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~