Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use the AP database to develop your queries. (MySQL WorkBench) 1. Get a list of

ID: 3848673 • Letter: U

Question

Use the AP database to develop your queries. (MySQL WorkBench)

1. Get a list of vendor names

2.      Get a list of vendor names and their default payment terms

3.      Get a list of account numbers and their descriptions

4.      Get a list of accounts that have invoices associated with them. Include a count of invoice line items for each account. Sort the list to show the account with highest number of invoice line items first.

5.      Get a list of account numbers and their descriptions that have invoices associated with them

6.      Get a list of vendors associated with each account number and description that is associated with an invoice

7.      Get a count of vendors for each account that is associated with an invoice

8.      Determine the total unpaid amount

9.      Get a breakdown by vendor, of the total unpaid amount for all invoices

10. Get a breakdown by account, of the total unpaid amount for all invoices

11. Determine the highest credit amount provided for an invoice

12. Determine the invoice(s) that received the highest credit amount

13. Determine the vendor(s) that provided the invoice(s) with highest credit amount

14. Identify the default account description associated with the invoice with highest credit amount

15. Identify the vendor who provided the highest invoice credit thus far, along with vendor location, and its default account description

Explanation / Answer

SELECT DISTINCT vendor.name

FROM purchaseorder

JOIN vendor USING (vendorid)

GROUP BY vendorid