Question: Question 4. New query! Create a SQL code to list. which Employee received the most products that were damaged? List information about the employee, such
Question 4. New query! Create a SQL code to list. which Employee received the most products that were damaged? List information about the employee, such as the EmployeeID, employee name, and employee email address. In addition, list the employeeID of the manager of that employee, the managers name and the managers email address. Use a MAX of the SUM of the QtyReceived in the Receiver table to make the determination of the most received products. Assume that new ConditionIDs may be created in the future, so make sure that your query uses the description of the damage (in the condition table) and not the ConditionID for the actual search in the where clause. In other words, use the word damage in the WHERE clause to do the search because there might be new types of "damage" for received products in the future. Here is the result table: The Result table will have 7 columns: ( EmployeeID, EmployeeName, EmpEmail, ManagerEmpID, ManagerName, ManagerEmail, & QuantityofDamageditemsReceived)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
