Turn in a .txt file with the SQL Select statements that you used to answer the q
ID: 3855239 • Letter: T
Question
Turn in a .txt file with the SQL Select statements that you used to answer the questions in scenario 1 and 2.
Scenario 1: My boss wants a list of all of the vendor names and phone number ordered by state so that she can contact them. Using the AP database, write a select statement that will retrieve these results. We only want the vendor names and phone number in the result set.
Scenario 2: My boss wants a list of all of the invoices that have a credit total and wants the list sorted by the invoice number. We only want to see the invoicenumber, invoice date, and credit total. We only want to see records for those that have a credit total in the result set
Need with table names in it please ASAP!
Let me know if anything is missing please
dbo.ContactUpdates dbo.GLAccounts dbo.InvoiceArchive dbo.InvoiceLineltems ES dbo·Invoices dbo.Terms dbo.VendorsExplanation / Answer
Answers:
1.SQL Select statement for list of all of the vendor names and phone number ordered by state
SELECT vender_names,phone_nameber from AP.vendorTable;
2.SQL Select statement for list of all of the invoices that have a credit total and wants the list sorted by the invoice number
SELECT invoiceNumber,invoiceData,creditTotal FROM AP.invoiceTable WHERE EXISTS(SELECT creditTotal FROM AP.invoiceTable where invoiceNumber=invoiceTable.invoiceNumber);
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.