View the step-by-step solution to:

Problem 15 For each Sales Order, show how many days it took to ship the order in order by the longest order, then by Sales Order Number. Display...

Sales Order ERD.pngProblem 15

For each Sales Order, show how many days it took to ship the order in order by the longest order, then by Sales Order Number. Display Sales Order Number and the number of days to ship. Include the orders that have not yet shipped. Hint: Look at the DATEDIFF function to return the difference between two dates. The two dates in this problem are the Order Date and the Shipment Date.

Sales Order ERD.png

Top Answer

Hello, check attached file. Note I first created the tables,... View the full answer

problem 15 solution.docx

SELECT SalesOrder.SalesOrderNumber, DATEDIFF(shipment.ShipmentDate,salesorder.OrderDate)AS
DaysToShip
FROM salesorder
LEFT JOIN shipment
ON salesorder.SalesOrderNumber=shipment.SalesOrderNumber...

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online