Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Database SQL question: Based on the Employee table shown below, determine what i

ID: 3576911 • Letter: D

Question

Database SQL question:

Based on the Employee table shown below, determine what is returned by the following query:

SELECT COUNT(*)

FROM Employee worker, Employee manager

WHERE worker.emp_mgr_emp_no =manager.emp_no AND

manager.emp_fname = 'Mark' AND manager.emp_lname = 'King';

The number of employees managed by Mark King

The number of employees not managed by Mark King

The names of employees and their managers.

The names of the employees managed by Mark King

A.

The number of employees managed by Mark King

B.

The number of employees not managed by Mark King

C.

The names of employees and their managers.

D.

The names of the employees managed by Mark King

Explanation / Answer

The following query answers the The number of employees managed by Mark King as the count is used for retreiving the number of rows of output.

manager.emp_fname = 'Mark' AND manager.emp_lname = 'King'; is used if the name is mark king

worker.emp_mgr_emp_no =manager.emp_no is used to find if the employee is a manager to any employee.