ocp考试资料群:569933648 验证码:ocp OCP 12c 19c考试题库解析与资料群:钉钉群号:35277291
全部博文(487)
分类: Oracle
2019-03-01 13:14:27
50、(11-15)choose two
Examine the structure of the MARKS table:
Which two statements would execute successfully?
A) SELECT SUM(subjectl+subject2+subject3)
FROM marks
WHERE student_name IS NULL;
B) SELECT SUM(DISTINCT NVL(subject1,0)), MAX(subjectl)
FROM marks
WHERE subjectl > subject2;
C) SELECT student_name,subjectl
FROM marks
WHERE subjectl > AVG(subjectl);
D) SELECT student_name, SUM (subjectl)
FROM marks
WHERE student_name LIKE 'R%';
Answer:AB
(解析:C 答案 where 子句中用到了 avg 函数,必须用 having;D 答案 student_name 没有在 group by 子句中出现。
B 答案可以写成如下方式运行:
SELECT SUM(DISTINCT NVL(comm,0)), MAX(sal)
FROM emp
WHERE sal > comm;
)