Midterm Spring 2013 - Form B


Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ical order. (Note: January has 31 days.) (9 points) Answer: SELECT Vendor.VendorNo, Vendor.VendorName, Vendor.VendorCity, SUM(CashPayment.PaymentAmount) FROM Vendor, CashPayment WHERE Vendor.VendorNo = CashPayment.VendorNo AND CashPayment.PaymentDate BETWEEN #1/1/2013# AND #1/31/2013# GROUP BY Vendor.VendorNo, Vendor.VendorName, Vendor.VendorCity ORDER BY Vendor.VendorCity DESC; 20) Write a SQL query to identify the total quantity of ʹGo Cycloneʹ t - shirts that Cyclone Team Wear purchased to its vendor, Best T- Shirt Supplier, on February 17, 2013. In the query results, include vendor name and the date these t - shirts were purchased. (Hint: Inventory description is ʹGo Cycloneʹ and vendor name is ʹBest T- Shirt Supplier.ʹ) (11 points) Answer: SELECT Vendor.VendorName, Purchase.PurchaseDate, SUM(Inventory_Purchase.Quantity) FROM Inventory, Inventory_Purchase, Purchase, Vendor WHERe Inventory.ItemNo = Inventory_Purahse.ItemNo AND Inventory_Purahse.PurchaseNo = Purchase.PurchaseNo AND Purchase.VendorN...
View Full Document

Ask a homework question - tutors are online