OCP-1Z0-051-题目解析-第10题

10. View the Exhibit and 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;

Answer: D

题目解析:

题目的意思:是求每一个促销在促销期间内。每周的的平均消费。

由给出的表可知:促销的总花费为 promo_cost 促销的时长为 (promo_end_date-promo_begin_date)。把促销时长转换为周须要除7为

 (promo_end_date-promo_begin_date)/7。所以每周的平均花费为promo_cost/( (promo_end_date-promo_begin_date)/7)

显然D是正确的,这题主要考察表达式的运算顺序,答案ABC在运行的时候都会提示语法错误。

时间: 2024-10-16 03:47:39

OCP-1Z0-051-题目解析-第10题的相关文章

Oracle OCP 11G 051(61题版本)答案解析目录

Oracle OCP 11G 051(61题版本)答案解析目录 61题版本 V9.02 1 http://blog.csdn.net/rlhua/article/details/17635843 2  http://blog.csdn.net/rlhua/article/details/17635887 3 http://blog.csdn.net/rlhua/article/details/17635919 86 4 http://blog.csdn.net/rlhua/article/det

英雄会题目解析- 第五届在线编程大赛月赛第三题:石子游戏

题目: 甲乙两人面对若干堆石子,其中每一堆石子的数目可以任意确定.两人轮流按下列规则取走一些石子,游戏的规则如下:1.每一步应取走至少一枚石子:2.每一步只能从某一堆中取走部分或全部石子:3.如果谁无法按规则取子,谁就是输家.如果甲乙两人都采取最优的策略,甲先拿,请问,是甲必胜还是乙必胜.输入格式:多组数据,每组数据两行,第一行是一个整数N, 2<=N<=10000下一行是N个正整数,代表每堆的石子数,石子数在32位整数内.输出格式:每组测试数据输出一行,如果甲存在必胜策略,输出"W

增量备份,11g052题目解析

增量备份分为差异备份(differential incremental backup)和累积备份(cumulative incremental backup),这是两种执行增量备份操作的不同方法. 80. You perform differential incremental level 1 backups of your database on each working day and level 0 backup on Sundays, to tape. Which two stateme

OCP-1Z0-051-题目解析-第11题

11. View the Exhibit and examine the structure of the PRODUCTS table.All products have a list price. You issue the following command to display the total price of each product after a discount of 25% and a tax of 15% are  applied on it. Freight charg

OCP-1Z0-051-题目解析-第5题

5. Which SQL statements would display the value 1890.55 as $1,890.55? (Choose three .) A. SELECT TO_CHAR(1890.55,'$0G000D00') FROM DUAL; B. SELECT TO_CHAR(1890.55,'$9,999V99') FROM DUAL; C. SELECT TO_CHAR(1890.55,'$99,999D99') FROM DUAL; D. SELECT TO

There&#39;s Treasure Everywhere! poj1473题目解析

题目: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 总时间限制:  1000ms 内存限制:  65536kB 描述 Finding buried treasures is simple: all you need is a map! The pirates in the Caribbean were famous for their enormous buried treasures and their elaborate maps

海量数据处理10题

1.海量日志数据,提取出某日访问百度次数最多的那个IP. 首先是这一天,并且是访问百度的日志中的IP取出来,逐个写入到一个大文件中.注意到IP是32位的,最多有个2^32个IP.同样可以采用映射的方法,比如模1000,把整个大文件映射为1000个小文件,再找出每个小文中出现频率最大的IP(可以采用hash_map进行频率统计,然后再找出频率最大的几个)及相应的频率.然后再在这1000个最大的IP中,找出那个频率最大的IP,即为所求. 或者如下阐述: 算法思想:分而治之+Hash IP地址最多有2

OCP-1Z0-051-题目解析-第1题

1. View the Exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTS, and TIMES tables. The PROD_ID column is the foreign key in the SALES table, which references the PRODUCTS table. Similarly, the CUST_ID and TIME_ID columns are also fore

Oracle OCP认证考试题库解析052-1&2

QUESTION 1 You notice that the performance of the database has degraded because of frequent checkpoints. Which two actions resolve the issue? (Choose two.) A. Disable automatic checkpoint tuning B. Check the size of the redo log file size and increas