您的位置:首页 > 其它

OCP-1Z0-051 补充题库 第37题

2014-10-16 00:08 369 查看
一、原题

See the exhibit and examine the structure of the CUSTOMERS and GRADES tables:



You need to display names and grades of customers who have the highest credit limit.

Which two SQL statements would accomplish the task? (Choose two.)

A.

SELECT custname, grade

FROM customers, grades

WHERE (SELECT MAX(cust_credit_limit)

FROM customers) BETWEEN startval and endval;
B.
SELECT custname, grade

FROM customers, grades

WHERE (SELECT MAX(cust_credit_limit)

FROM customers) BETWEEN startval and endval

AND cust_credit_limit BETWEEN startval AND endval;

C.

SELECT custname, grade

FROM customers, grades

WHERE cust_credit_limit = (SELECT MAX(cust_credit_limit)

FROM customers)

AND cust_credit_limit BETWEEN startval AND endval;

D.

SELECT custname, grade

FROM customers , grades

WHERE cust_credit_limit IN (SELECT MAX(cust_credit_limit)

FROM customers)

AND MAX(cust_credit_limit) BETWEEN startval AND endval;

答案: B,C



二、题目翻译


下面是CUSTOMERS and GRADES表的结构

要显示有最高信用额度的客户的names和grades

下面哪句能实现这个功能

三、题目解析

customers, grades两张表的关联条件是cust_credit_limit BETWEEN startval AND endval,

然后,要求信用额度最大的客户,再添加一个条件,信用额=最大值。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息