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

SQL, the tables are as follows with the questions below. Thanks for any help! Co

ID: 3701322 • Letter: S

Question

SQL, the tables are as follows with the questions below.

Thanks for any help!

Consumer Table
Tb_Consumers
Con_ID | Name | City

Offers Table
Tb_Offers
Supp_ID | Prod_ID | Price | Quantity

Product Table
Tb_Products
Prod_ID | Name | MU

Requests Table
Tb_Requests
Con_ID | Prod_ID | Price | Quantity

Supplier Table
Tb_Supplier
Supp_ID | Name | City

Transaction Table
Tran_ID | Supp_ID | Con_ID | Prod_ID | Price | Quantity  

QUESTIONS:

-- List of names of suppliers offering only computers.

-- List of names of suppliers offering only computers and trucks

Explanation / Answer

Answer:

select s.name from Tb_Supplier s , Tb_Products p, Tb_Offers o where s.supp_id = o.supp_id and o.prod_id = p.product_id and p.name='computers';


select s.name from Tb_Supplier s , Tb_Products p, Tb_Offers o where s.supp_id = o.supp_id and o.prod_id = p.product_id and p.name in ('computers' , 'trucks');