Consider the Customer Invoice database we have been using in class for practicing and answer the following questions. Using JOIN, write the SQL statements that will generate the following reports: a. A list of the products supplied by vendors with the name of the vendor as shown below.
Expert Answer
Hi,
For accurate answer, you need to share all the tables of customer invoice database.
As of now, I am answering it based on my understanding from the sample query output format. I assume that we have a vendor table which has vendor_id column as primary key and it has vendor_name column as well.
Query-
SELECT PRODUCT_CODE,DESCRIPTION,QUANTITY_ON_HAND,UNIT_PRICE ,
VENDOR_NAME
FROM PRODUCTS P
JOIN VENDOR V
ON P.VENDOR_ID=V.VENDOR_ID
AND VENDOR_NAME IN(
‘Bryson, Inc.’,’D&E Supply’,’Gomez Bros.’,’ORDVA, Inc’,’Randsets Ltd.’.’Rubicon Sis.’)