Q60. View the exhibit and examine the structure in ORDERS and ORDER_ITEMS tables.

1z0-071 Oracle Database 12c SQL 第60题 CREATE VIEW
You need to create a view that displays the ORDER_ID, ORDER_DATE, and the total number of items in each order.
Which CREATE VIEW statement would create the views successfully?
A. CREATE OR REPLACE VIEW ord_vu
AS SELECT o.order_id, o.order_date, COUNT (i.line_item_id)
FROM orders o JOIN order_items i
ON (o.order_id = i.order_id)
GROUP BY o.order_id, o.order_date;
B. CREATE OR REPLACE VIEW ord_vu (order_id, order_date)
AS SELECT o.order_id, o.order_date, COUNT (i.line_item_id)
"NO OF ITEMS"
FROM orders o JOIN order_items i
ON (o.order_id = i.order_id)
GROUP BY o.order_id, o.order_date;
C. CREATE OR REPLACE VIEW ord_vu
AS SELECT o.order_id, o.order_date, COUNT (i.line_item_id)
"NO OF ITEMS"
FROM orders o JOIN order_items i
ON (o.order_id = i.order_id)
GROUP BY o.order_id, o.order_date;
D. CREATE OR REPLACE VIEW ord_vu
AS SELECT o.order_id, o.order_date, COUNT (i.line_item_id) ||
"NO OF ITEMS"
FROM orders o JOIN order_items i
ON (o.order_id = i.order_id)
WHITH CHECK OPTION;

Correct Answer: C

相关文章:

  • 2021-12-17
  • 2021-05-29
  • 2021-11-26
  • 2021-11-08
  • 2021-07-25
  • 2021-05-17
  • 2022-12-23
  • 2021-04-24
猜你喜欢
  • 2021-05-26
  • 2022-01-12
  • 2021-04-08
  • 2021-09-25
  • 2021-07-20
  • 2021-07-05
  • 2021-04-07
相关资源
相似解决方案