Write an update statement that modifies the vendorcopy


1.Write a SELECT statement that returns four columns:

VendorName From the Vendors table
InvoiceNumber From the Invoices table
InvoiceDate From the Invoices table
Balance InvoiceTotal minus the sum of PaymentTotal and CreditTotal

The result should have one row for each invoice with a non-zero balance.
Sort the result set by VendorName in ascending order.

2.Write a SELECT statement that returns two columns:
VendorName and PaymentSum, where PaymentSum is the sum of the PaymentTotal column. Group the result set by VendorName. Return only 10 rows, corresponding to the 10 vendors who've been paid the most.

Hint: Use the TOP clause and join Vendors to Invoices.

3.Write an INSERT statement that adds a row to the invoiceCopy table with the followings values:
VendorID:32 InvoiceTotal:$434.58 TermsID:2 InvoiceNumber:AX-014-027
PaymentTotal:$0.00 InvoiceDueDate: 11/21/08 InvoiceDate: 10/21/08 
CreditTotal: $0.00 PaymentDate: null

4.Write an UPDATE statement that modifies the VendorCopy table. Change the default account number to 403 for each vendor that has a default account number 400.

Request for Solution File

Ask an Expert for Answer!!
PL-SQL Programming: Write an update statement that modifies the vendorcopy
Reference No:- TGS0142298

Expected delivery within 24 Hours