111.View the Exhibit and examine the structure of the CUSTOMERS table.

来源:互联网 发布:怎样下载flash软件 编辑:程序博客网 时间:2024/05/23 00:09
111.View the Exhibit and examine the structure of the CUSTOMERS table.
Which statement would display the highest credit limit available in each income level in each city in the
CUSTOMERS table?
A.SELECT cust_city, cust_income_level, MAX(cust_credit_limit ) FROM customers
GROUP BY cust_city, cust_income_level, cust_credit_limit;
B.SELECT cust_city, cust_income_level, MAX(cust_credit_limit) FROM customers
GROUP BY cust_city, cust_income_level;
C.SELECT cust_city, cust_income_level, MAX(cust_credit_limit) FROM customers
GROUP BY cust_credit_limit, cust_income_level, cust_city ;
D.SELECT cust_city, cust_income_level, MAX(cust_credit_limit) FROM customers
GROUP BY cust_city, cust_income_level, MAX(cust_credit_limit);
答案:B
解析:题目说要显示在每个income level,每个city 中的最高的 credit limit
因此直接按照他俩进行group by就行了,因此选择b
0 0