Which query will provide the required output?

You need to list the employees in DEPARTMENT_ID 20 days in a single row, ordered by HIRE_DATE.
Examine the sample output:

Which query will provide the required output?
A. SELECT LISTAGG(last_name)
WITHIN GROUP ORDER BY (hire_date) "Emp_list", MIN(hire_date) "Earliest"
FROM employees
WHERE department_id = 30;
B. SELECT LISTAGG(last_name, ‘; ‘)
WITHIN GROUP ORDER BY (hire_date) "Emp_list", MIN(hire_date) "Earliest"
FROM employees
WHERE department_id = 30;
C. SELECT LISTAGG(last_name, ‘; ‘) "Emp_list", MIN(hire_date) "Earliest"
FROM employees
WHERE department_id = 30;
WITHIN GROUP ORDER BY (hire_date);
D. SELECT LISTAGG(last_name, ‘; ‘) "Emp_list", MIN(hire_date) "Earliest"
FROM employees
WHERE department_id = 30;
ORDER BY (hire_date);

Download Printable PDF. VALID exam to help you PASS.

One thought on “Which query will provide the required output?

  1. B. SELECT LISTAGG(last_name, ‘; ‘)
    WITHIN GROUP ( ORDER BY hire_date) “Emp_list”, MIN(hire_date) “Earliest”
    FROM employees
    WHERE department_id = 30;

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.