Question 246
View the Exhibit and examine the structure of the ORDER_ITEMS table.

Examine the following SQL statement:
SELECT order_id, product_id, unit_price
FROM order_items
WHERE unit_price
(SELECT MAX(unit_price)
FROM order_items
GROUP BY order_id);
You want to display the PRODUCT_ID of the product that has the highest
UNIT_PRICE per ORDER_ID. What correction should be made in the above SQL statement to achieve this?

Examine the following SQL statement:
SELECT order_id, product_id, unit_price
FROM order_items
WHERE unit_price
(SELECT MAX(unit_price)
FROM order_items
GROUP BY order_id);
You want to display the PRODUCT_ID of the product that has the highest
UNIT_PRICE per ORDER_ID. What correction should be made in the above SQL statement to achieve this?
Question 247
Examine the following query:

What is the output of this query?

What is the output of this query?
Question 248
Examine the description of the TRANSACTIONS table:

Which two SQL statements execute successfully?

Which two SQL statements execute successfully?
Question 249
Examine this description of the EMP table:

You execute this query:
SELECT deptno AS "departments", SUM (sal) AS "salary"
FROM emp
GROUP | BY 1
HAVING SUM (sal)> 3 000;
What is the result?

You execute this query:
SELECT deptno AS "departments", SUM (sal) AS "salary"
FROM emp
GROUP | BY 1
HAVING SUM (sal)> 3 000;
What is the result?
Question 250
Examine the description of the PRODUCTS table:

Which two statements execute without errors?

Which two statements execute without errors?
