Created
June 3, 2019 19:09
-
-
Save prof3ssorSt3v3/7a0e90e393f6ead7eb7a79406a364e32 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT p.productName, pl.productLine, c.customerName | |
FROM productlines AS pl INNER JOIN products AS p | |
ON pl.productLine = p.productLine | |
INNER JOIN orderdetails AS od | |
USING (productCode) | |
INNER JOIN orders AS o | |
USING (orderNumber) | |
INNER JOIN customers AS c | |
USING (customerNumber) | |
INNER JOIN employees AS e | |
ON c.salesRepEmployeeNumber = e.employeeNumber | |
INNER JOIN offices AS off | |
USING (officeCode) | |
WHERE pl.productLine = 'Planes' AND off.city = 'Sydney'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Excellent tutor!