Why am I not able to do this query in the following Database:W3 School Database (The tables are listed on the right side)?
SELECT Customers.CustomerName,
OrderDetails.ProductID
FROM Customers
INNER JOIN Orders
ON Customers.CustomerID = Orders.CustomerID
INNER JOIN OrderDetails
ON Orders.OrderID = OrderDetails.OrderID
I am trying to see the productIDs of what customers have ordered. The query above should match customers with orders and then take those order ids and find the correct OrderDetails to output a table with CustomerName and ProductID.
I get the following error:
Syntax error (missing operator) in query expression 'Customers.CustomerID = Orders.CustomerID INNER JOIN OrderDetails ON Orders.OrderID = OrderDetails.OrderID.
Thanks in advance.