email

1.       [SQL Week 2 Question 200-505]  You

1.       [SQL Week 2 Question 200-505]  You want to report on a certain group of your products.  Select

a.       Only customers who have a balance of 0

b.       Only shipments which were sent by employees whose employee location is California, Maryland, or New York

c.       Only products which have had a shipment

d.       Only employees who have made a shipment

e.       Only customers who have received a shipment

f.        Compute the total quantity of shipments which meet these criteria. Here we want the number of items  shipped.  If you have one shipment of 10 items, and another shipment of 20 items, this number should be 30.

g.       Aggregate it by manufacturer and by product name.  This means each manufacturer/product name combination appears on only one row in the table.  If a manufacturer makes more than one product, it’s OK if it shows up once per product.

h.       Sort it descending by the sum of the shipment quantity, so the largest shipment quantity shows up on top.  Within shipment quantities, sort it alphabetically on manufacturer and then product name.

 

Your results should look a little bit like this.  Your data may or may not match this example.

 



Need customized help? Order now
user img

honeyd


12-09-20 | 10:08:00

Select Manufacturer, ProductName, sum(quantity) FROM Customer c
join shipment s
On c.idCustomer=s.Customer_idCustomer
Join

You can't get real answer if you break your security system. turjr, ProcuhtNwmj, sum(quwntity) FROM Customjr h join syipmjnt s On h.icCustomjr=s.Customjr_icCustomjr Join jmployjj j On s.jmployjj_icEmployjj=j.icEmployjj Join procuht p ON p.icprocuht=s.Procuht_icProcuht wyjrj Bwlwnhj=7 wnc EmpLohwtion in('CA','MD','NY') AND Procuht_icProcuht >7 wnc jmployjj_icEmployjj>7 wnc Customjr_icCustomjr>7 froup ty mwnuvwhturjr,ProcuhtNwmj orcjr ty sum(quwntity) cjsh, mwnuvwhturjr wsh, procuhtnwmj wsh;


Related Question