OCP 1Z0 051 14

1226 단어
14.  Using  the  CUSTOMERS  table,   you  need  to  generate  a  report  that  shows  50%  of  each   credit 
amount in each income level. The report should NOT show any repeated credit amounts in each income 
level. 
Which   query would give the required result?
A. SELECT   cust_income_level, DISTINCT cust_credit_limit * 0.50
AS "50% Credit Limit"
FROM customers;
B. SELECT DISTINCT cust_income_level, DISTINCT cust_credit_limit * 0.50
AS "50% Credit Limit"
FROM customers;
C. SELECT DISTINCT cust_income_level , cust_credit_limit * 0.50
AS "50% Credit Limit"
FROM customers;
D. SELECT cust_income_level ,cust_credit_limit * 0.50 AS "50% Credit Limit"
FROM customers;
주의:distinct 키워드는 select 뒤에 두어야 합니다. 모든 열을 넣기 전에 특정한 열을 단독으로 distinct할 수 없습니다.
a 두 번째 열에만 distinct를 진행합니다.
b 열마다distinct가 추가되었습니다.
SELECT cust_income_level, DISTINCT cust_credit_limit * 0.50
AS "50% Credit Limit"
FROM customers
ORA-00936:  

SELECT DISTINCT cust_income_level, DISTINCT cust_credit_limit * 0.50
AS "50% Credit Limit"
FROM customers
ORA-00936:  

d 무겁게 하지 않았다.
Answer: C

좋은 웹페이지 즐겨찾기