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

I. Compute the commission for each sales representative, assuming the commission

ID: 3816780 • Letter: I

Question

I. Compute the commission for each sales representative, assuming the commission is 5% of the cost of an order. Sort by employee last name and first name. j. What is the difference in days between the most recent and oldest order date in the Orders file? k. Compute the average time between order date and ship date for each customer ordered by the largest difference. l. What is the value of orders shipped in August 2004? m. List the employees who report to those employees who report to Diane Murphy. Use the CONCAT function to combine the employee's first name and last name into a single field for reporting. n. Report the names of all customers and if they have placed any orders, list the order numbers associated with them. If a customer has not placed any orders, be sure to include the name of that customer in your report.

Explanation / Answer

I am assuming the column names and the table names . feel free to ask any doubt.

Query outer join:

select C.customername, O.ordernum
from customers as C left join orders as O
on C.customerId = O.customerId;