Oracle Database 12c SQL 1z0-071 Question # 46 Topic 5 Discussion

Oracle Database 12c SQL 1z0-071 Question # 46 Topic 5 Discussion

1z0-071 Exam Topic 5 Question 46 Discussion:
Question #: 46
Topic #: 5

Which statement will return a comma-separated list of employee names in alphabetical order for each department in the EMP table?


A.

SELECT deptno,LISTAGG(ename, ' , ') WITHIN GROUP AS employee_list FROM emp GROUP BY deptno;


B.

SELECT deptno,LISTAGG(ename, ', ') WITHIN GROUP AS employee_list FROM emp GROUP BY deptno ORDER BY ename;


C.

SELECT deptno,LISTAGG(ename, ', ') WITHIN GROUP (GROUP BY deptno) AS employee_list FROM emp ORDER BY ename;


D.

SELECT deptno,LISTAGG(ename, ', ') WITHIN GROUP (ORDER BY ename) AS employee_list FROM emp GROUP BY deptno;


Get Premium 1z0-071 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.