Question: Problem 4 Write a single sql statement that uses a union of multiple queries to answer the following question: For each of our vendors, which
Problem
Write a single sql statement that uses a union of multiple queries to answer the following question:
For each of our vendors, which accounts are used to pay them and how often?
For each vendor in our system, identify the accounts used to pay the vendor as well as the number of
times the account was used to pay the vendor. Display the vendor's name, the vendor's ID the account
description, and the account usage ie the number of times that account was used to pay that vendor
If we have not purchased anything from a vendor ie we have not been invoiced by a vendor display
the phrase No Orders Placed With This Vendor' in lieu of an account description. Results should be
displayed from greatest account usage to least accounts usage and column headers should match the
example shown below.
Notes:
Use one or more unions when answering this question
Do NOT employ any outer joins when answering this question
Shown below are the results for Problems and
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
