Q15. Table ORDER_ITEMS contains columns ORDER_ID, UNIT_PRICE and QUANTITY, of data type NUMBER

Q15. Table ORDER_ITEMS contains columns ORDER_ID, UNIT_PRICE and QUANTITY, of data type NUMBER.

Examine these 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 two statements are true?

  • (A). Statement 1 returns only one row of output.
  • (B). Statement 2 returns only one row of output.
  • (C). Both statements will return NULL if either UNIT_PRICE or QUANTITY contains NULL.
  • (D). Both the statements give the same output.
  • (E). Statement 2 may return multiple rows of output.
0 0 đánh giá
Đánh giá bài viết
Theo dõi
Thông báo của
guest
0 Góp ý
Phản hồi nội tuyến
Xem tất cả bình luận