What would happen when the above statement is executed?

View the Exhibit and examine PRODUCTS and ORDER_ITEMS tables. You executed the
following query to display PRODUCT_NAME and the number of times the product has been
ordered: SELECT p.product_name, i.item_cnt FROM (SELECT product_id, COUNT (*)
item_cnt FROM order_items GROUP BY product_id) i RIGHT OUTER JOIN products p ON
i.product_id = p.product_id; What would happen when the above statement is executed?

View the Exhibit and examine PRODUCTS and ORDER_ITEMS tables. You executed the
following query to display PRODUCT_NAME and the number of times the product has been
ordered: SELECT p.product_name, i.item_cnt FROM (SELECT product_id, COUNT (*)
item_cnt FROM order_items GROUP BY product_id) i RIGHT OUTER JOIN products p ON
i.product_id = p.product_id; What would happen when the above statement is executed?

A.
The statement would not execute because the GROUP BY clause cannot be used in the
inline view.

B.
The statement would not execute because the ITEM_CNT alias cannot be displayed in
the outer query.

C.
The statement would execute successfully to produce the required output.

D.
The statement would not execute because inline views and outer joins cannot be used
together.



Leave a Reply 0

Your email address will not be published. Required fields are marked *