SQL - Advanced Joins
You want to find all customers and their orders, including customers without orders and orders without customers. You write:
Why might this query exclude some customers without orders?
SELECT C.CustomerID, O.OrderID FROM Customers C FULL OUTER JOIN Orders O ON C.CustomerID = O.CustomerID WHERE O.OrderDate > '2023-01-01';
Why might this query exclude some customers without orders?
