WITH union_table AS ( --LEFT JOIN Customers to PA SELECT c.*, pa.* FROM Customers AS c LEFT JOIN PortfolioAmounts AS pa USING(customerid) UNION ALL -- Simulated RIGHT JOIN Customers to PA SELECT c.*, pa.* FROM PortfolioAmounts AS pa LEFT JOIN Customers AS c USING(customerid) ) SELECT DISTINCT * FROM union_table