10.View the Exhibit;examine the structure of the PROMOTIONS table.

来源:互联网 发布:jdbc批量insert数据 编辑:程序博客网 时间:2024/06/04 18:12
10.View the Exhibit;examine the structure of the PROMOTIONS table.
Each promotion has a duration of at least seven days .
Your manager has asked you to generate a report, which provides the weekly cost for each promotion
done to l date.

Which query would achieve the required result?


A.SELECT promo_name, promo_cost/promo_end_date-promo_begin_date/7 FROM promotions;
B.SELECT promo_name,(promo_cost/promo_end_date-promo_begin_date)/7 FROM promotions;
C.SELECT promo_name, promo_cost/(promo_end_date-promo_begin_date/7) FROM promotions;
D.SELECT promo_name, promo_cost/((promo_end_date-promo_begin_date)/7) FROM promotions;
答案:D
解析:这里题目的意思是要你写一个按周对每个促销活动的统计,考察的是优先级
A:错误,promo_cost/promo_end_date先执行了
B:错误,promo_cost/promo_end_date先执行了
C:错误,promo_begin_date/7先执行了
D:正确
0 0