Course Solutions Uncategorized (Solved) : Code Produce Results Fig 1 Please Produce Code Give Results Fig 2 Fig Therefore Fig2 Shows Q26424482 . . . .

(Solved) : Code Produce Results Fig 1 Please Produce Code Give Results Fig 2 Fig Therefore Fig2 Shows Q26424482 . . . .

 

The code below produce results in Fig. 1.Please produce code that will give the results in Fig. 2.Fig. Therefore Fig.2 shows which shipper shipped the leastnumber of orders per category.

Note: DISTINCT doesn’twork

SQL Code:

SELECT CategoryName, CompanyName, MIN(OrderCount) ASMinOrdersShipped

FROM
(
SELECT
C.CategoryName, S.CompanyName

,O.ShipVia

,COUNT(O.OrderID) AS ‘OrderCount’

FROM Orders O

INNER JOIN Shippers S

ON O.ShipVia = S.ShipperID

INNER JOIN [Order Details] D

ON O.OrderID = D.OrderID

INNER JOIN Products P

ON D.ProductID = P.ProductID

INNER JOIN Categories C

ON P.CategoryID = C.CategoryID

GROUP BY C.CategoryName,S.CompanyName, O.ShipVia

) AS SHIPCATCOUNT

GROUP BY CategoryName, CompanyName

ORDER BY CategoryName

Fig. 1 1 Beverages Federal Shipping 118 2 Beverages Speedy Express 122 3 Beverages United Package 164 4Condiments Federal Shipping 63 5 Condiments 

<div class=

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : Following Set Points Describe Closest Pair Algorithm Finds Closest Pair Points 1 2 2 1 3 3 Q28824726 . . . .(Solved) : Following Set Points Describe Closest Pair Algorithm Finds Closest Pair Points 1 2 2 1 3 3 Q28824726 . . . .

<p>For the following set of points, describe how the CLOSEST-PAIRalgorithm finds a closest pair of points:</p><p>(1,2),(2,-1),(3,-3),(3,2),(-3,4),(-1,2),(2,3),(1,1),(-5,-2)</p> Expert Answer Answer to For the following set of points, describe how the