Question: SQL /********************************************************************************* Q4: 10 Records List the top 10 Vendors by how much they have paid. Return the VendorName and total payments */ /********************************************************************************* Q5:

SQL /********************************************************************************* Q4: 10 Records List the top 10 Vendors by how much they have paid. Return the VendorName and total payments */ /********************************************************************************* Q5: 10 Records List the top 10 vendors with the most number of invoices (included ties). Return VendorName, the total number of invoices, and the total amount of the invoice totals. Name columns VendorName, InvoiceCount, and InvoiceSum Use new school notation. */ /********************************************************************************* Q6: 10 Records Write the same thing as the previous query but with no ties and assume we can only show 10 records at a time and want to view the 3rd page of records. NOTE: This one can throw you off and you should test your code. May need a secondary sorter */ /********************************************************************************* Q7: 6 Records List, by GLAccount description, the number of items for each GLAccount type and the total invoice line item amount. Only return GLAccount types that show up more than 3 times Name the fileds AccountDescription, LineItemCount, LineItemSum. Sort the list by the LineItemCount from highest to lowest */ /********************************************************************************* Q8: 22 Records NOTE: This question can be done in a couple of ways. You know one way. From the InvoiceLineItems table return the sum of each AccountNo. In this query you are to include a single row that has the value of NULL for the AccountNo and the total for all rows */ --------------------------------------------------------------------------------

.sql file

ContactUpdates: VendorID, LastName, firstName

GLAccounts: AccountNo, AccountDesc

InvoiceArchives: InvoiceID, VendID, InvoicNum, InvDate, InvTotal, PaymentTotal, CreditTotal, TermsID, InvDueDate, PaymentDATE, isDeleted

InvoiceLineItems: InvoiceID, InvoiceSequence, AcctNo, InvoiceLineItemAmount, InvoiceLineItemDescription

Invoices: InvoiceID, VendID, InvoicNum, InvDate, InvTotal, PaymentTotal, CreditTotal, TermsID, InvDueDate, PaymentDATE, isDeleted

TermsID: TermsDesc, TermsDueDate

Vendors: VendID, VendorName, VendorAddress1, VendorAddress2, VendorCity, VendorState, VendorZip, VendorPhone, VendorContactLastName, VendorContactFirstName, DefaultTermsID, DefaultAccountNo

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!