Outer Join Case Study - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The outer join is a powerful tool, and its output can be as difficult to interpret as to produce. A lack of understanding can produce unexpected, costly, and undesired results. For example, you may erroneously mail promotional fliers to 17 million customers instead of the 17,000 customers that you intended to target.

This case study shows common pitfalls of the outer join, including how a poorly worded outer join request can cause a simple inner join and how an improperly constructed outer join can return millions of rows that do not answer the business question you are trying to ask.

The study also provides guidelines to help you get a feeling for whether you are answering the business question you think you are asking with your outer joins. The study helps you to understand the complexity of outer joins by using realistic examples and explanations.

As this case study shows, multiple results are possible, and the correct solution is not necessarily intuitive, especially in a complex query:

This case study was developed by Rolf Hanusa and is used with his permission.