OCP-1Z0-051-题目解析-第8题
8. View the Exhibit and examine the structure of the CUSTOMERS table.
Which two tasks would require subqueries or joins to be executed in a single statement? (Choose two.)

(题意:题目给出了一个Customers表。问哪两个任务在一条语句中运行须要用到子查询或者连接语句。)
A. listing of customers who do not have a credit limit and were born before 1980
B. finding the number of customers, in each city, whose marital status is 'married'
C. finding the average credit limit of male customers residing in 'Tokyo' or 'Sydney'
D. listing of those customers whose credit limit is the same as the credit limit of customers residing in the city 'Tokyo'
E. finding the number of customers, in each city, whose credit limit is more than the average credit limit ofall the customers
Answer: DE
A:列出没有信用额度且出生日期大于1980的客户。
Select * from customers Where Cust_Credit_Limit is NULL and Cust_Year_Of_Birth >1980;
B:分别统计每一个城市已婚客户的数量。
Select Cust_City, Count(*) from Customers
Where Cust_Maritial_Status='married' group by Cust_City ;
C:统计'Tokyo' 和'Sydney'两个城市男性客户信用额度的平均值
Select Avg(Cust_Credit_Limit) from
Customers Where Cust_gender='male' and Cust_City in('Tokyo' ,'Sydney');
D:列出Tokyo城市里信用额度相等的客户。
Select * from Customers Cust1,Customers Cust2
where Cust1.Cust_Credit_Limit=Cust2.Cust_Credit_Limit
and Cust2.Cust_City='Tokyo';
E:统计每一个城市信用额度大于平均信用额度客户的数量。
Select Cust_City, Count(*) from Customers
Where Cust_Credit_Limit>(Select
avg(Cust_Credit_Limit) from
Customers)
group by Cust_City;
由上可见。答案DE分别使用的连接语句和子查询
OCP-1Z0-051-题目解析-第8题的更多相关文章
- 1Z0-053 争议题目解析
1Z0-053 争议题目解析 Summary 题目NO. 题目解析链接地址 题库答案 参考答案 考查知识点 24 http://www.cnblogs.com/jyzhao/p/5319220.ht ...
- 1Z0-053 争议题目解析25
1Z0-053 争议题目解析25 考试科目:1Z0-053 题库版本:V13.02 题库中原题为: 25.You enabled Flashback Data Archive on the INVEN ...
- 1Z0-053 争议题目解析24
1Z0-053 争议题目解析24 考试科目:1Z0-053 题库版本:V13.02 题库中原题为: 24.Which of the following information will be gath ...
- 1Z0-053 争议题目解析46
1Z0-053 争议题目解析46 考试科目:1Z0-053 题库版本:V13.02 题库中原题为: 46.What happens when you run the SQL Tuning Adviso ...
- 1Z0-053 争议题目解析86
1Z0-053 争议题目解析86 考试科目:1Z0-053 题库版本:V13.02 题库中原题为: 86.Your production database is running in archivel ...
- 1Z0-053 争议题目解析134
1Z0-053 争议题目解析134 考试科目:1Z0-053 题库版本:V13.02 题库中原题为: 134.You are managing an Oracle Database 11g datab ...
- 1Z0-053 争议题目解析154
1Z0-053 争议题目解析154 考试科目:1Z0-053 题库版本:V13.02 题库中原题为: 154.A database is running in ARCHIVELOG mode and ...
- 1Z0-053 争议题目解析175
1Z0-053 争议题目解析175 考试科目:1Z0-053 题库版本:V13.02 题库中原题为: 175.You are peer reviewing a fellow DBAs backup p ...
- 1Z0-053 争议题目解析212
1Z0-053 争议题目解析212 考试科目:1Z0-053 题库版本:V13.02 题库中原题为: 212.Note the following parameters settings in you ...
- 1Z0-053 争议题目解析304
1Z0-053 争议题目解析304 考试科目:1Z0-053 题库版本:V13.02 题库中原题为: 304.What privileges must be granted to allow an a ...
随机推荐
- Javah生成JNI头文件
首先确保java的环境变量配置好了. 1:打开cmd 进入doc命令窗口: 进入class所在目录,我的class是在F:\summerVacation\ndkhelloworld\bin\class ...
- Oracle中的EXCEPTION
Oracle系统预定义的异常 比如:SELF_IS_NULL.VALUE_ERROR.ZERO_DIVIDE等Oracle中自带的异常类型 使用方法: DECLARE V_Result ); BEGI ...
- 替换NavigationController里面的返回按钮
通过navigationController push进来的controller,默认的返回按钮是将本controller pop出去. 但有时候想在pop出去前完成一些自己的一些事情,这时可以自己写 ...
- BZOJ 1622: [Usaco2008 Open]Word Power 名字的能量
题目 1622: [Usaco2008 Open]Word Power 名字的能量 Time Limit: 5 Sec Memory Limit: 64 MB Submit: 349 Solved ...
- XMPP--- error : linker command failed with exit code 1
error: linker command failed with exit code 1 (use -v to see invocation) 错误原因:libidn.a文件没添加上去 解决方法:l ...
- UVA610 - Street Directions(Tarjan)
option=com_onlinejudge&Itemid=8&category=153&page=show_problem&problem=551"> ...
- Spring通过AOP实现对Redis的缓存同步
废话不多说 说下思路:使用aop注解,在Service实现类添加需要用到redis的方法上,当每次请求过来则对其进行拦截,如果是查询则从redis进行get key,如果是update则删除key,防 ...
- C++获取当前时间和计算程序运行时间的方法
C++获取当前时间和计算程序运行时间的方法 获取当前时间: #include <iostream> #include <Windows.h> using namespace s ...
- SSH整合,"sessionFactory " or "hibernateTemplate " is required异常
首先遇到的问题就是HibernateDaoSupport引起的,程序中所有的DAO都继承自HibernateDaoSupport,而HibernateDaoSupport需要注入sessionfact ...
- php抓取ajax页面返回图片。
要抓取的页面:http://pic.hao123.com/ 当我们往下滚动的时候,图片是用ajax来动态获取的.这就需要我们仔细分析页面了. 可以看到,异步加载的ajax文件为: http://pic ...