【OCP-12c】CUUG 071题库考试原题及答案解析(23)
23.choose the best answer
View the Exhibits and examine PRODUCTS and SALES tables.
You issue the following query to display product name and the number of times the
product has been sold:
SQL>SELECT p.prod_name, i.item_cnt
FROM (SELECT prod id, COUNT(*) item_cnt
FROM sales GROUP BY prod_id) i RIGHT OUTER JOIN products p
ON i.prod_id = p.prod_id;
What happens when the above statement is executed?
A) The statement executes successfully and produces the required output.
B) The statement produces an error because a subquery in the FROM clause and outer-joins cannot be used together.
C) The statement produces an error because ITEM_CNT cannot be displayed in the outer query.
D) The statement produces an error because the GROUP BY clause cannot be used in a subquery in the FROM clause.
Answer:A
(SQL> select d.dname,e.emp_cnt
from (select deptno,count(*) emp_cnt from emp group by deptno)e right outer join dept d
on e.deptno=d.deptno;
DNAME EMP_CNT
-------------- ----------
ACCOUNTING 2
RESEARCH 4
SALES 6
OPERATIONS
TRAIN)
【OCP-12c】CUUG 071题库考试原题及答案解析(23)的更多相关文章
- 【OCP认证12c题库】CUUG 071题库考试原题及答案(28)
28.choose the best answer Evaluate the following SQL statement: SQL> SELECT promo_id, promo_categ ...
- 【OCP认证12c题库】CUUG 071题库考试原题及答案(27)
27.choose two The SQL statements executed in a user session are as follows: SQL> CREATE TABLE pro ...
- 【OCP认证12c题库】CUUG 071题库考试原题及答案(26)
26.choose two Examine the structure of the PRODUCTS table. Which two statements are true? A) EXPIRY_ ...
- 【OCP认证12c题库】CUUG 071题库考试原题及答案(25)
25. choose the best answer Evaluate the following SQL statement: ALTER TABLE hr.emp SET UNUSED (mgr_ ...
- 【OCP-12c】CUUG 071题库考试原题及答案解析(24)
24. choose the best answer In the EMPLOYEES table there are 1000 rows and employees are working in t ...
- 【OCP-12c】CUUG 071题库考试原题及答案解析(22)
5.choose the best answer Evaluate the following CREATE SEQUENCE statement: CREATE SEQUENCE seq1 STAR ...
- 【OCP-12c】CUUG 071题库考试原题及答案解析(21)
3.choose three View the Exhibit and examine the description of SALES and PROMOTIONS tables. You want ...
- 【OCP-12c】CUUG 071题库考试原题及答案解析(20)
20.choose two Examine the description of the EMP_DETAILS table given below: Which two statements are ...
- 【OCP-12c】CUUG 071题库考试原题及答案解析(19)
1.choose the best answerWhat is the primary difference between the relational database (RDB) andobje ...
随机推荐
- How to Integrate JCaptcha in Spring Security
The repository for JCaptcha is this one: <repository> <id>sourceforge-releases</id> ...
- Spring Boot下Druid连接池的使用配置分析
https://blog.csdn.net/blueheart20/article/details/52384032
- Linux学习---linux系统下安装配置Jenkins
1.首先准备java环境,安装JDK 2.下载jenkins至Linux服务器 下载地址:https://wiki.jenkins-ci.org/display/JENKINS/Installing+ ...
- mybatis使用原始Dao开发中存在的问题
1.Dao方法存在重复代码:通过SqlSessionFactory创建SqlSession,调用SqlSession的送数据库操作方法. 2.调用SqlSession的数据库需要制定statement ...
- MVC过滤器实现用户登录验证
前言当我们访问某个网站的时候需要检测用户是否已经登录(通过Session是否为null),我们知道在WebForm中可以定义一个BasePage类让他继承System.Web.UI.Page,重写它的 ...
- JetBrains全家桶激活地址
全家桶地址:https://www.jetbrains.com/products.html?fromMenu JetBrains 授权服务器(License Server URL):http://id ...
- Java面向对象理解_代码块_继承_多态_抽象_接口
面线对象: /* 成员变量和局部变量的区别? A:在类中的位置不同 成员变量:在类中方法外 局部变量:在方法定义中或者方法声明上 B:在内存中的位置不同 成员变量:在堆内存 局部变量:在栈内存 C:生 ...
- sql时间戳转日期格式
FROM_UNIXTIME(ctime, '%Y-%m-%d %H:%i:%s')
- 20155317 2016-2017-2 《Java程序设计》第7周学习总结
20155317 2016-2017-2 <Java程序设计>第7周学习总结 教材学习内容总结 1.在只有Lambda表达式的情况下,参数的类型必须写出来. 2.Lambda表达式本身是中 ...
- 07Mendel's First Law
Problem Figure 2. The probability of any outcome (leaf) in a probability tree diagram is given by th ...