天天看点

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

一、原题

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

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

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,

然后,要求信用额度最大的客户,再添加一个条件,信用额=最大值。