Which statements are true regarding the output of these SQL statements?

View the Exhibit and examine the details of the ORDER_ITEMS table.
Evaluate the following 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 statements are true regarding the output of these SQL statements? (Choose all that apply.)

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

Evaluate the following 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 statements are true regarding the output of these SQL statements? (Choose all that apply.)

A.
Statement 1 would return only one row of output.

B.
Both the statements would give the same output.

C.
Statement 2 would return multiple rows of output.

D.
Statement 1 would not return any row because the GROUP BY clause is missing.

E.
Both statements would ignore NULL values for the UNIT_PRICE and QUANTITY columns.



Leave a Reply 2

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


user

user

create table test (c1 number, c2 number);
insert into test values (3, 3);
select count(c1), count(c2), count(*) from test;

Cindy

Cindy

Why E is correct?