Question: Q 1 . Use the AP database for this question. Write a SQL query to display the InvoiceNumber as Inv _ Number and the InvoiceTotal
Q Use the AP database for this question. Write a SQL query to display the InvoiceNumber as InvNumber and the InvoiceTotal as InvTotal for those invoices that have an InvoiceTotal greater than or equal to but less than or equal to
Q Use the AP database for this question. Write a SQL query that displays all columns from the Vendors table innerjoined with the Invoices table. Be sure there is one unique record for each VendorID and order the result set by VendorName
Q Use the AP database for this question. Write a SQL query that displays VendorID, VendorName, InvoiceNumber, InvoiceDate and Balance with Balance being the InvoiceTotal minus the sum of the PaymentTotal and CreditTotal. The result set should have one row for each invoice with a balance above zero. Sort the results by Balance with the largest Balance at the top of the list.
Q Use the AP database for this question. Write a SQL query that displays AccountNo and AccountDescription from the GLAccounts table. The result set should have one row for each account number that has never been used. Sort on AccountNo. Hint: Use an outer join to the InvoiceLineItems table.
Q Use the AP database for this question. Use the UNION operator to display the VendorName and VendorState. If the Vendor is in California, the VendorState value should be CA; otherwise the VendorState value should be Outside CA Sort on VendorName.
Q Use the AP database for this question. Write a SQL query to display VendorName and PaymentSum with PaymentSum being the sum of the PaymentTotal column. Group the result set by VendorName and return only rows, corresponding to the vendors whove been paid the most
Q Use the AP database for this question. Write a SQL query that displays the AccountNo and the total amount invoiced for each AccountNo as LineItemSum. Use the WITH ROLLUP operator to include a grand total row.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
