CORRECT TEXT
Click the Exhibit button and examine the data from the ORDERS and CUSTOMERS tables.
Evaluate this SQL statement:
SELECT cust_id, ord_total
FROM orders
WHERE ord_total > ANY(SELECT ord_total
FROM orders
WHERE cust_id IN (SELECT cust_id
FROM customers
WHERE city LIKE
‘New York’));
What is the result when the above query is executed?
A.
CUST_ID ORD_TOTAL
15 10000
40 8000
35 12500
15 12500
10 8000
B.
CUST_ID ORD_TOTAL
15 10000
35 12500
15 12000
C.
CUST_ID ORD_TOTAL
15 10000
40 8000
15 12000
15 6000
20 5000
35 7000
20 6500
10 8000
D.
CUST_ID ORD_TOTAL
15 6000
20 5000
20 6500
E.
The query returns no rows.
F.
The query fails because ANY is not a valid operator with a subquery.
B is correct.
Yes, B.
A