Midterm Spring 2013 - Form B

Notejanuaryhas31days7points answer

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: 27 points total) Inventory ItemNo, Description, UnitCost, UnitPrice, QuantityOnHand, QuantityOrdered Purchase PurchaseNo, PurchaseDate, PurchaseAmount, VendorNo, EmployeeNo Cash AccountNo, AccountType, Bank, Balance 3 CashPayment CheckNo, PaymentAmount, PaymentDate, VendorNo, AccountNo, PurchaseNo, EmployeeNo Employee EmployeeNo, EmployeeName, Street, City, State, ZipCode, Telephone, HireDate Vendor VendorNo, VendorName, VendorStreetAddress, VendorCity, VendorState, VendorZipCode Inventory_Purchase ItemNo, PurchaseNo, Quantity 18) Write a SQL query to find the average dollar value of all purchases made in January 2013. (Note: January has 31 days.) (7 points) Answer: SELECT AVG(PurchaseAmount) FROM Purchase WHERE PurchaseDate BETWEEN #1/1/2013# AND #1/31/2013#; 19) Write a SQL query to find the total dollar value of all payments made to each vendor in January 2013. Also, include each vendor number, name, and city in the query results and show the query results with the vendor cities listed in reverse alphabet...
View Full Document

This document was uploaded on 03/13/2014.

Ask a homework question - tutors are online