OCP认证051考试题库:11g-v9.02-第149题
最新学讯:近期OCP认证正在报名中,因考试人员较多请尽快报名获取最近考试时间,报名费用请联系在线老师,甲骨文官方认证,报名从速!
我要咨询OCP认证051考试题库:11g-v9.02-第149题,完整题库请点击这里联系老师咨询了解
149. View the Exhibits and examine the structures of the COSTS and PROMOTIONS tables.
Evaluate the following SQL statement:
SQL> SELECT prod_id FROM costs
WHERE promo_id IN (SELECT promo_id FROM promotions
WHERE promo_cost < ALL
(SELECT MAX(promo_cost) FROM promotions
GROUP BY (promo_end_date-
promo_begin_date)));
What would be the outcome of the above SQL statement?
A. It displays prod IDs in the promo with the lowest cost.
B. It displays prod IDs in the promos with the lowest cost in the same time interval.
C. It displays prod IDs in the promos with the highest cost in the same time interval.
D. It displays prod IDs in the promos with cost less than the highest cost in the same time interval.
Answer: D
试题解析:
1、首先查询出promo_end_date- promo_begin_date期间promo_cost的最大值
2、 < ALL,即小于1查询出来所有的的值,即小于最小值。
3、按题中查询,即查询出小于MAX(promo_cost) 的所有的值。