Left join
A left join combines two relations while retaining every row from the left relation and including matching rows from the right, with nulls for unmatched right-side values.
Grokking AI Applications
A join that retains every row from the left table and adds matching rows from the right table when available.
- How it is used
- Preserves customers without purchases when preparing personalized emails.
- How deep it goes
- Explains matching, missing values, and repeated rows through a worked comparison with inner and right outer joins.
- Examples
- Joins customer master data to transaction history, retaining customers without purchases and repeating one with two transactions.
- What you can do after
- Apply it via the KNIME Joiner node to combine customer and transaction tables while retaining all customers.
The Well-Grounded Data Analyst
A left join combines records from two datasets while retaining every record from the left dataset and matching records from the right dataset when available.
- How it is used
- Enriches purchase-derived customer records with CRM details without discarding unmatched purchases.
- How deep it goes
- Works through a pandas merge, missing-value inspection, match filtering, field replacement, and source flags.
- Examples
- Uses purchase customers and a CRM export, finding roughly 7,000 matched purchase records among about 33,000 rows.
- What you can do after
- Apply it via pandas to preserve a base customer dataset while adding available matched fields.
Read how The Well-Grounded Data Analyst explains left join →
Build Financial Software with Generative AI (From Scratch)
A left join is a relational query operation that returns every row from the left relation and matching rows from the right relation, representing missing matches with null values.
- How it is used
- Keeps files, companies, batches, and exceptions visible when related records are optional or missing.
- How deep it goes
- Explains join selection through API queries and tests, then addresses duplicate rows and missing-value fallbacks.
- Examples
- Uses invalid ACH files, company addresses and phones, batch searches, and exception recovery options.
- What you can do after
- Diagnose/debug missing API results by testing for absent related records and replacing appropriate inner joins with left joins.
Read how Build Financial Software with Generative AI (From Scratch) explains left join →
Statistics Slam Dunk
A left join is a tabular merge that retains all rows from one input and attaches matching values from a second input.
- How it is used
- Preserves a primary dataset while attaching matching variables needed for analysis, visualization, or derived calculations.
- How deep it goes
- Explains row retention, key matching, column growth, and verification, but does not develop join internals.
- Examples
- Demonstrates free-agent summaries, road-and-home game records, team salary inequality, and annual scoring averages.
- What you can do after
- Apply it via dplyr::left_join() to combine related tables while preserving the left table's observations.
Learn SQL in a Month of Lunches
A left outer join is an SQL join that returns all rows from the left table together with matching rows from the right table, representing missing right-side matches with null values.
- How it is used
- Preserves every row from a primary table while adding available related data.
- How deep it goes
- Defines preservation and nulls, demonstrates filtering traps, and notes alternatives without developing full outer joins.
- Examples
- Uses orders and promotions, unmatched customers, and customers’ qualifying orders as practical query exercises.
- What you can do after
- Build it from scratch for complete-left-table reports, optional matches, unmatched records, and carefully placed filters.
Read how Learn SQL in a Month of Lunches explains left join →
Pandas Workout: 200 exercises to make you a stronger data analyst
A left join retains rows driven by the left input and attaches matching rows from the right input when available.
- How it is used
- Combines normalized DataFrames so separate product and sales data can be analyzed together.
- How deep it goes
- Explains the left-side row-selection rule and demonstrates index preparation, joining, grouping, and aggregation.
- Examples
- Uses products_df and sales_df, joined on product_id, then groups results by product name, date, or both.
- What you can do after
- Apply it via pandas DataFrame.join to combine normalized datasets and aggregate values from the resulting rows.
Read how Pandas Workout: 200 exercises to make you a stronger data analyst explains left join →
Also covered in
What to know first
- missing valueA missing value is an expected data value or observation that is absent, unavailable, unknown, or inapplicable.
- inner joinAn inner join is a relational operation that returns combinations of rows only when the join condition matches records in both input relations.
- outer joinAn outer join combines matching rows from two inputs and preserves unmatched rows from one or both inputs, representing missing counterparts with null values.
Related concepts
- missing valueproduces · A missing value is an expected data value or observation that is absent, unavailable, unknown, or inapplicable.
- joinkind of · A join is an operation that combines records or data elements from multiple inputs according to matching or related values or conditions.
- inner joinalternative to · An inner join is a relational operation that returns combinations of rows only when the join condition matches records in both input relations.
- $lookupimplemented by · $lookup is a MongoDB aggregation-pipeline stage that joins documents from another collection, typically using a left outer join.
- where clausecontrasts with · A WHERE clause is a query-language clause that restricts returned or affected rows or records according to a specified condition.
Questions about left join
What is left join?
A left join combines two relations while retaining every row from the left relation and including matching rows from the right, with nulls for unmatched right-side values.
Which Manning books explain left join?
Grokking AI Applications, The Well-Grounded Data Analyst, Build Financial Software with Generative AI (From Scratch), Statistics Slam Dunk, Learn SQL in a Month of Lunches and Pandas Workout: 200 exercises to make you a stronger data analyst.
What should I know before learning left join?
Manning books that teach left join usually introduce missing value, inner join, outer join and right outer join first.
What is the difference between left join and inner join?
A left join combines two relations while retaining every row from the left relation and including matching rows from the right, with nulls for unmatched right-side values. An inner join is a relational operation that returns combinations of rows only when the join condition matches records in both input relations.
What is left join a kind of?
Left join is a kind of join. A join is an operation that combines records or data elements from multiple inputs according to matching or related values or conditions.
What is left join also called?
Left join is also called left outer join.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.





