• Post author:
  • Post category:Blog
  • Reading time:2 mins read
  • Post last modified:June 12, 2024

Refer to the exhibit. You need to get information about customer purchases that is stored in the two tables. You would like to see data from the OrderID, CustomerName, OrderAmount, and OrderDate columns. To obtain this information, how would you complete the following partial SQL query?

Introduction to Structured Queries Quiz Answers 01
Introduction to Structured Queries Quiz Answers 01

SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderAmount, Orders.OrderDate
FROM Orders
INNER JOIN _______ ON _____________ = _____________;

  • INNER JOIN Orders ON Orders.OrderID=Orders.CustomerID;
  • INNER JOIN Customers ON Customer.CustomerID=Customers.CustomerID;
  • INNER JOIN Orders ON Orders.CustomerID=Customers.CustomerID;
  • INNER JOIN Customers ON Orders.CustomerID=Customers.CustomerID;
Answers Explanation & Hints:

An INNER JOIN returns the rows from both tables that contain the same information in the column or columns specified in the ON clause. To complete the INNER JOIN clause, first specify the name of the additional table, which is the Customers Table in this example. Then specify which columns must contain the same information in order for the row to be returned. In this example, you are joining the two tables on the data in the CustomerID column, which contains the same information in both tables.

For more Questions and Answers:

7.5.2 Module 7 Quiz – Introduction to Structured Queries Exam Answers Full 100%

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments