Question & Answer: N, write the SQL statements that will generate the following reports: a. A list o…..

Consider the Customer Invoice database we have been using in class for practicing and answer the following questions 1- Using JOIN, write the SQL statements that will generate the following reports: A list of the products supplied by vendors with the name of the vendor as sho a. below. Product code Description 23109-HB Claw hammer SM-18277 1.25-in. metal screw, 25 SW-23116 2.5-in. wd. screw, 50 13-02/P2 7.25-in. pwr. saw blade 14-01/139.00-in. pwr. saw blade 54778-2T Rat-tail file, 1/8-in. fine 2232/QTY B&D jigsaw, 12-in. blade 223 Quantity on Hand Unit Price Vendor name 23 9.95 Bryson, Inc. 6.99 Bryson, Inc. 237 8.45 D&E Supply 32 14.99 Gomez Bros. 18 17.49 Gomez Bros. 4.99 Gomez Bros. 8 109.92 ORDVA, Inc. 6 99.87 ORDVA, Inc. 11 256.99 ORDVA, Inc. 172 43 2/QWE B&D jigsaw, 8-in.blade 89-WRE-Q Hicut chain saw, 16 in. 1546-002 Hrd. cloth, 1/4-in, 2x50 1558-awl Mrd. doth, 1/2-in, 3x50 11QER/91 |Power 2238/QPD B&D cordless drill, 1/2-in WR3/TT3 Steel matting, 4x81/6 5 mesh 15 39.95 Randsets Ltd. 23 43.99 Randsets Ltd 8 109.99 Rubicon Sis. 12 38.95 Rubicon Sis r painter, 15 psi, 3-nozzle 18 119.95 Rubicon Sis

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.’)

Still stressed from student homework?
Get quality assistance from academic writers!