Register Login

Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHAR(30) SALARY NUMBER(8,2) Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only if the minimum salary is less than 5000 and maximum salary is more than 15000?

Updated May 18, 2018

Q.Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHAR(30) SALARY NUMBER(8,2)

Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only if the minimum salary is less than 5000 and maximum salary is more than 15000?


A. SELECT dept_id, MIN (salary), MAX (salary) FROM employees WHERE MIN(salary) 15000;

B. SELECT dept_id, MIN (salary), MAX (salary) FROM employees WHERE MIN (salary)
C. SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN (salary)
D. SELECT dept_id MIN (salary), MAX (salary) FROM employees GROUP BY dept_id HAVING MIN(salary) 15000

E. SELECT dept_id,MIN (salary), MAX (salary) FROM employees GROUP BY dept_id, salary HAVING MIN (salary) 15000;


Answer: D


×