Question: 1- . Write a CREATE VIEW statement that defines a view named InvoiceBasic that returns three columns: VendorName, InvoiceNumber, and InvoiceTotal. Then, write a SELECT

1- . Write a CREATE VIEW statement that defines a
1- . Write a CREATE VIEW statement that defines a view named InvoiceBasic that returns three columns: VendorName, InvoiceNumber, and InvoiceTotal. Then, write a SELECT statement that returns all of the columns in the view, sorted by VendorName, where the first letter of the vendor name is N, O, or P. Here is result set with 8 records: VendorName InvoiceNumber Invoice Total Pacific Bel 111-92R-10096 16.33 19.67 CO N - Pacific Bell 111-92R-10094 Pacific Bell 111-92R-10097 16.33 Pacific Bell 111-82R-10092 46.21 Pacific Bell 111-02R-10093 39.77 Pacific Bell 111-92R-10095 32.70 Pollstar 77280 1750.00 Postmaster CBM8820-M-177108 290.00 CREATE VIEW Vendorinvoice AS SELECT VendorName, InvoiceNumber, InvoiceTotal FROM Vendors JOIN Invoices ON Vendors. VendorID = Invoices.VendorID GO SELECT * FROM VendorInvoice WHERE left(VendorName,1) IN ('N' , '0 ' , 'P' ) ORDER BY VendorName Create a view named Top10PaidInvoices that returns three columns for each vendor: VendorName, LastInvoice (the most recent invoice date), and SumOfInvoices (the sum of the InvoiceTotal column). Return only the 10 vendors with the largest SumOfInvoices and include only paid invoices. Then, write a SELECT statement to return all data from the view. Here is result set with 10 records

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 Accounting Questions!