143. 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 > ALL (SELECT MAX(promo_begin_date)
FROM promotions )AND
promo_category = 'INTERNET';
B. SELECT promo_name, promo_begin_date FROM promotions
WHERE promo_begin_date IN (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 promo_begin_date
FROM promotions
WHERE 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');
Answer: C
答案解析:
参考:http://blog.csdn.net/rlhua/article/details/12879585
显示在最后一个promo之后并且category为INTERNET开始的所有promos的promo name和start date。
A,promo_category = 'INTERNET'应该再子查询里面。
B,条件不满足,条件要求找出最后一个promo之后并且category为INTERNET开始的所有promos的promo name和start date。
C,正确,大于ALL,即是大于最大值。
D,错误,大于ANY,即是大于最小值。