View the Exhibit and examine the structure of the PROMOTIONS table. You have to
generate a report that displays the promo name and start date for all promos that started
after the last promo in the ‘INTERNET’ category. Which query would give you the required
output?
A.
SELECT promo_name, promo_begin_date FROM promotions WHERE
promo_begin_date IN (SELECT promo_begin_date FROM promotions WHERE
promo_category=’INTERNET’);
B.
SELECT promo_name, promo_begin_date FROM promotions WHERE
promo_begin_date > ALL (SELECT promo_begin_date FROM promotions WHERE
promo_category = ‘INTERNET’);
C.
SELECT promo_name, promo_begin_date FROM promotions WHERE
promo_begin_date > ALL (SELECT MAX(promo_begin_date) FROM promotions )AND
promo_category = ‘INTERNET’;
D.
SELECT promo_name, promo_begin_date FROM promotions WHERE
promo_begin_date > ANY (SELECT promo_begin_date FROM promotions WHERE
promo_category = ‘INTERNET’);
Explanation:
The correct answer is C.
This and many other questions i am seeing here are wrong!
C is wrong: (SELECT MAX(promo_begin_date) FROM promotions) returns all promotions.
A is wrong: IN (SELECT promo_begin_date FROM promotions WHERE promo_category=’INTERNET’).
This means that = to any other Internet promotion begin date an not after the last date.
D is wrong:
The correct answer is B.