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

(Answered) : Instructions The Bluth Company (“TBC”) owns and operates a frozen banana stand on the boardwalk in Newport Beach, Califor(Answered) : Instructions The Bluth Company (“TBC”) owns and operates a frozen banana stand on the boardwalk in Newport Beach, Califor

Instructions The Bluth Company (“TBC”) owns and operates a frozen banana stand on the boardwalk in Newport Beach, California (http://bit.ly/1M4esOi), from which it sells frozen bananas to the general public. TBC