Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1 0.5 pts Which type of join will only retrieve records in which there are matching values in both tables? JOIN LEFT JOIN
Question 1 0.5 pts Which type of join will only retrieve records in which there are matching values in both tables? JOIN LEFT JOIN OUTER JOIN O INNER JOIN Question 2 0.5 pts Which type of join will show ALL records of the primary table and match records from the secondary table if they exist? O INNER JOIN LEFT JOIN JOIN O OUTER JOIN Question 3 0.5 pts When performing a Join in which the Primary Key field name does not match the Foreign Key field name, which Join statement can be used to complete the join? SELECT * FROM trinkets AS t INNER JOIN gadgets AS g WHERE t.TrinketID = g.PartID ON t.TrinketID = g.PartID USING (t.TrinketID = g.PartID) O WHERE t.TrinketID = g.PartID Question 4 1 pts The Northwind company would like to know if any of their employees are from t.TrinketID = g.PartID ON t.TrinketID = g.PartID USING (t.TrinketID = g.PartID) WHERE t.TrinketID = g.PartID Question 4 1 pts The Northwind company would like to know if any of their employees are from the same city as any of our suppliers. Would the below query work and answer this request? SELECT EmployeeID, LastName, Firstname, CompanyName AS NearSupplier FROM northwind. employee INNER JOIN northwind.supplier USING (city); No, the query won't run due to an error Yes O No, a Left Join is needed Question 5 The query below has an error in it, identify the problem SELECT p.ProductID, p.ProductName, SUM(od. Quantity) AS NumOrdered FROM product AS p LEFT JOIN orderdetail AS od USING (ProductID) ORDER BY NumOrdered GROUP BY p.ProductID; The alias name can not be used in the Order By clause The join should be an INNER JOIN, not a LEFT JOIN The Group By clause is missing the ProductName field The Order By clause is in the wrong place 1 pts
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started