Last active
July 10, 2020 14:55
-
-
Save karenpayneoregon/55cfa05ac21809ffed6146089fd7649d to your computer and use it in GitHub Desktop.
Using NorthWind2020 select customers
This file contains 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 Cust.CustomerIdentifier, | |
Cust.CompanyName, | |
Cust.ContactId, | |
CT.ContactTitle, | |
C.FirstName, | |
C.LastName, | |
Cust.Street, | |
Cust.City, | |
Cust.Region, | |
Cust.PostalCode, | |
Countries.[Name] AS CountryName, | |
Cust.CountryIdentifier, | |
Cust.Phone, | |
Cust.Fax, | |
Cust.ContactTypeIdentifier, | |
Cust.ModifiedDate | |
FROM Customers AS Cust | |
INNER JOIN Contacts AS C ON Cust.ContactId = C.ContactId | |
INNER JOIN ContactType AS CT ON Cust.ContactTypeIdentifier = CT.ContactTypeIdentifier | |
INNER JOIN Countries ON Cust.CountryIdentifier = Countries.CountryIdentifier; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment