Computer science or c++,,,,, answer this using SQL please 13. Using the commands
ID: 3712516 • Letter: C
Question
Computer science or c++,,,,, answer this using SQL please
13. Using the commands SELECT, PROJECT, and JOIN, write a sequence of instructions to answer each of the following questions about parts and their manufacturers in terms of the following database: Part relation PartName Weight Bolt 2X Bolt 2Z Nut V5 1.5 0.5 Manufacturer relation CompanyName PartName Cost Company X Bolt 2Z .03 Company X Nut V5 .01 Company Y Bolt 2X .02 CompanyY Nut V5 CompanyY Bolt 2Z 04 Company 2z .01 Nut V5 .01 a. Which companies make Bolt 2Z? madeby Company X C. Which companies make a part with weight 1 ? along with each part's cost.Explanation / Answer
Please find the SQL queries for your question below:
a) SELECT CompanyName from Manufacturer
WHERE partname="Bolt 2Z";
b) SELECT PartName, Cost from Manufacturer
WHERE CompanyName="Company X";
c) SELECT CompanyName
from Manufacturer JOIN Part
ON Manufacturer.PartName=Part.PartName
WHERE PartName.Weight=1;
Kindly let me know if you have any doubts!
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.