Retrieve the invoices.invoicenumber, InvoiceLineItems.InvoiceLineItemDescription
ID: 646578 • Letter: R
Question
Retrieve the invoices.invoicenumber, InvoiceLineItems.InvoiceLineItemDescription, vendors.VendorName, InvoiceLineItems.InvoiceLineItemAmount, and invoices.InvoiceDate from the AP database with 1 sql select statement. The results should be the same as the table below.
Invoice Number Description Vendor Amount Invoice Date QP58872 MVS Online Library IBM 116.54 2012-01-07 00:00:00 Q545443 MSDN IBM 1083.58 2012-02-09 00:00:00 MABO1489 Quarterly Maintenance Wang Laboratories, Inc. 936.93 2012-02-21 00:00:00Explanation / Answer
SQL server query:
SELECT Invoices.invoicenumber, InvoiceLineItems.InvoiceLineItemDescription, vendors.VendorName, InvoiceLineItems.InvoiceLineItemAmount, invoices.InvoiceDate
From Invoices JOIN InvoiceLineItems ON Invoices.invoicenumber=InvoiceLineItems.invoicenumber JOIN Vendors ON Vendors.vendorID=Invoices.vendorID;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.