Multiple choice

What will be the output of the following query? select dept from employee e group by dept having (select count() from employee cs_e where e.dept = cs_e.dept and (position like %managers' or position like %supervisor or position like '%president%'))>(select count() from employees cs_e where e.dept = cs_e.dept and (position not like '%manager' and position not like '%supervisor%' and position not like 'president%')) order by dept; Table: Employee(emp_id,fname,lname,dept,position)

  1. It will display the name of the departments that have managers, supervisors and president.

  2. It will display the name of the departments that have more employees with job titles such as managers, supervisors or president than not.

  3. It will display the name of the departments that have manager, assistant manager, supervisor, vice president or president.

  4. It will display the name of the departments that have more employees with job titles such as managers, assistant manager, supervisors, vice president or president than not.

  5. None of these

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

As per explanation given in option 2, option 4 is the correct answer.