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?
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?
Correct Answer: A,E
https://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqlj27781.html
The Expression can contain multiple column references or expressions, but it cannot contain another aggregate or subquery. It must evaluate to a built-in data type. You can therefore call methods that evaluate to built-in data types. (For example, a method that returns a java.lang.Integer or int evaluates to an INTEGER.) If an expression evaluates to NULL, the aggregate skips that value.
The Expression can contain multiple column references or expressions, but it cannot contain another aggregate or subquery. It must evaluate to a built-in data type. You can therefore call methods that evaluate to built-in data types. (For example, a method that returns a java.lang.Integer or int evaluates to an INTEGER.) If an expression evaluates to NULL, the aggregate skips that value.