OCP 11g考试题库详解:1Z0-051-111题
最新学讯:近期OCP认证正在报名中,因考试人员较多请尽快报名获取最近考试时间,报名费用请联系在线老师,甲骨文官方认证,报名从速!
我要咨询OCP 11g考试题库详解:1Z0-051-111题,完整题库请点击这里联系老师咨询了解
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; 分组先按照city再按照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);
Answer: B
试题解析:
按照题意,先按照每个城市后按照每个城市中的收入水平来分组查看最高的credit limit
故在group by时应为 group by cust_city, cust_income_level;
A答案,没有涉及到cust_credit_limit的分组。
B答案与题意相符,正确,数据太多,取前5行。
C答案,没有涉及cust_credit_limit分组,且cust_income_level, cust_city 顺序错了,应为group by cust_city, cust_income_level;
D答案,语法错误