Computer Science The following script uses a derived table to return he date and invoice total of the earliest invoice issued by each vendor. Write a script that generates the same results set but...


Computer Science


The following script uses a derived table to return he date and invoice total of the earliest invoice issued by each vendor. Write a script that generates the same results set but uses a temporary table in place of the derived table. Make sure your script tests for the existence of any objects it creates.



Use itse2333; SELECT VendorName, FirstInvoiceDate, InvoiceTotal FROM Invoices JOIN (SELECT VendorID, MIN(InvoiceDate) as FirstInvoiceDate FROM invoices GROUP BY VendorID) as FirstInvoices ON (Invoices.VendorID = FirstInvoice.FirstInvoice.VendorID and Invoices.InvoiceDate = First.Invoice.FirstInvoiceDate) JOIN Vendors ON Invoices.VendorID = Vendor.VendorID ORDER BY VendorName, FirstInvoiceDate);



Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here