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 ...
随机推荐
- BZOJ 1669: [Usaco2006 Oct]Hungry Cows饥饿的奶牛( LIS )
裸的LIS ----------------------------------------------------------------- #include<cstdio> #incl ...
- java覆写equals方法
何时需要重写equals() 当一个类有自己特有的“逻辑相等”概念(不同于对象身份的概念). object规范规定,如果要重写equals(),也要重写hashcode() 如何覆写equals() ...
- Servlet学习的两个案例之网站访问次数的统计
一.统计次数的Servlet源码 package com.shanrengo; import java.io.IOException; import javax.servlet.ServletCont ...
- C#学习日记之数据库连接
一.webconfig设置和参数解释 在C#中新建一个网站时,webconfig文件中会有一个默认的数据库连接语句,如下 <connectionStrings> <add name= ...
- QT VS检测内存泄漏
测试程序:http://download.csdn.net/detail/ajaxhe/4085447 vld-2.2.3: http://vld.codeplex.com/releases/view ...
- Qt plugin系统的几点说明
对于一个大型软件系统来说,实现plugin是一件很美妙的事情,一个成功的plugin系统可以使软件增色不少.Plugin最大的功能是在一定程度内提高了软件的灵活度和可扩展性.一个设计精良的server ...
- 工商管理硕士(MBA)-北大国际MBA
工商管理硕士(MBA)-北大国际MBA [EMBA校友跨届晚会]不管风雨彩虹 我们永远在一起
- 从零开始学C++之IO流类库(三):文件的读写、二进制文件的读写、文件随机读写
一.文件的读写 如前面所提,流的读写主要有<<, >>, get, put, read, write 等操作,ofstream 继承自ostream, ifstream 继承自 ...
- Python中函数式使用
对于链表来讲,有三个内置函数非常有用: filter(),map() 以及 reduce(). filter(function, sequence) 返回一个 sequence(序列),包括了给定序列 ...
- Redis 突然报错 NOAUTH Authentication required
查找相关资料,说是添加了密码 只需要在redis的配置文件redis.conf中开启requirepass就可以了,比如我设置我的访问密码是mypassword requirepass mypassw ...