66.View the Exhibit and examine the data in the COSTS table.
2016-03-02 10:30
225 查看
66.View the Exhibit and examine the data in the COSTS table.
You need to generate a report that displays the IDs of all products in the COSTS table whose unit price is
at least 25% more than the unit cost. The details should be displayed in the descending order of 25% of the unit cost.
You issue the following query:
SQL>SELECT prod_id
FROM costs
WHERE unit_price >= unit_cost * 1.25
ORDER BY unit_cost * 0.25 DESC;
Which statement is true regarding the above query?
A.It executes and produces the required result.
B.It produces an error because an expression cannot be used in the ORDER BY clause.
C.It produces an error because the DESC option cannot be used with an expression in the ORDER BY clause.
D.It produces an error because the expression in the ORDER BY clause should also be specified in the SELECT clause.
答案:A
You need to generate a report that displays the IDs of all products in the COSTS table whose unit price is
at least 25% more than the unit cost. The details should be displayed in the descending order of 25% of the unit cost.
You issue the following query:
SQL>SELECT prod_id
FROM costs
WHERE unit_price >= unit_cost * 1.25
ORDER BY unit_cost * 0.25 DESC;
Which statement is true regarding the above query?
A.It executes and produces the required result.
B.It produces an error because an expression cannot be used in the ORDER BY clause.
C.It produces an error because the DESC option cannot be used with an expression in the ORDER BY clause.
D.It produces an error because the expression in the ORDER BY clause should also be specified in the SELECT clause.
答案:A
相关文章推荐
- Tomcat中jar包和class的加载顺序
- 理解JavaScript作用域和作用域链(转)
- ZooKeeper典型应用场景(转)
- js实现不重复导入的方法
- 26. Remove Duplicates from Sorted Array
- 按键和LED复用扫描程序
- 01-ROS系统介绍及安装
- Python爬虫入门四之Urllib库的高级用法
- Maven依赖排除 禁止依赖传递 取消依赖的方法
- 当CheckStyle在Eclipse上报File contains tab characters时,你应该如何做
- 使用 Eclipse Memory Analyzer 进行堆转储文件分析
- git入门(5)-Git revert和git reset版本的回退
- UTC - mysqld got signal 6
- 基于JavaScript实现智能右键菜单
- 2016年2月28家中国域名商(国际域名)保有量统计
- swing开发工具包
- Android屏幕适配全攻略(最权威的官方适配指导)
- 在action中调用去出现java.lang.NullPointerException错误
- 2301: [HAOI2011]Problem b/1101: [POI2007]Zap 莫比乌斯反演
- c++ (P49—P68)