Which statement produces the number of different departments that have employees with last name Smith?

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) Which statement produces the number of different departments that have
employees with last name Smith?

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) Which statement produces the number of different departments that have
employees with last name Smith?

A.
SELECT COUNT(*) FROM employees WHERE last_name=’Smith’;

B.
SELECT UNIQUE(dept_id) FROM employees WHERE last_name=’Smith’;

C.
SELECT COUNT(DISTINCT dept_id) FROM employees WHERE last_name=’Smith’;

D.
SELECT COUNT (dept_id) FROM employees WHERE last_name=’Smith’;

E.
SELECT DISTINCT(COUNT(dept_id)) FROM employees WHERE last_name=’Smith’;



Leave a Reply 0

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