Created
May 19, 2019 22:29
-
-
Save ArCiGo/2c8e62d4c2c253475577762741fe0bf5 to your computer and use it in GitHub Desktop.
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 ord.OrderNumber, | |
ord.TotalAmount, | |
cus.FirstName, | |
cus.LastName, | |
cus.City, | |
cus.Country | |
FROM Customer cus | |
LEFT JOIN [ORDER] ord ON cus.Id = ord.CustomerId | |
ORDER BY ord.TotalAmount; | |
GO | |
/** Output **/ | |
OrderNumber TotalAmount FirstName LastName City Country | |
----------- --------------------------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- | |
NULL NULL Diego Roel Madrid Spain | |
NULL NULL Marie Bertrand Paris France | |
542912 12.50 Patricio Simpson Buenos Aires Argentina | |
542937 18.40 Paolo Accorti Torino Italy | |
542897 28.00 Pascale Cartrain Charleroi Belgium | |
542716 28.00 Maurizio Moroni Reggio Emilia Italy | |
543028 30.00 Yvonne Moncada Buenos Aires Argentina | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment