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

List of names of suppliers offering both computers and oranges. Tb_Offers: Supp_

ID: 3730376 • Letter: L

Question

List of names of suppliers offering both computers and oranges.

Tb_Offers:

Supp_ID | Prod_ID | Price | Quantity |

Tb_Product:

Prod_ID | Name | MU |

Tb_Supplier:

Supp_ID | Name | City |

--Below is what I have, but I am doing something wrong because the desired output is not being produced. Thanks for any help given.

SELECT DISTINCT Tb_Supplier.Name
FROM Tb_Supplier,
TB_Offers, Tb_Product
WHERE Tb_Supplier.Supp_ID=TB_Offers.Supp_ID
AND Tb_Product.Prod_ID=TB_Offers.Prod_ID
AND (Tb_Product.Name = 'Computer' OR Tb_Product.Name = 'Oranges')

Explanation / Answer

SELECT DISTINCT Tb_Supplier.Name

FROM Tb_Product JOIN Tb_Offcers ON Tb_Product.Prod_ID = Tb_Offers.Prod_ID

JOIN Tb_Supplier ON Tb_Offers.Supp_ID = Tb_Supplier.Supp_ID

WHERE Tb_Product.Name = 'Computer' AND Tb_Product.Name = 'Oranges'

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote