Module 4 of 6Lesson 1 of 2~16 min
Join tables with INNER JOIN and LEFT JOIN
Most product questions cut across several tables: accounts and usage, customers and invoices. You learn to join tables in SQL and to find what is missing, such as customers who never used a feature. A skill you can put straight to work on onboarding targeting or churn risk.
Lesson objective
By the end of this lesson, you will be able to combine two or more tables with INNER JOIN and LEFT JOIN on the right key, use table aliases, and find rows without a match (anti-join) to answer questions such as "which accounts have never scheduled an intervention?".
Topics covered
- INNER JOIN
- LEFT JOIN
- anti-join
- SQL join
- table alias
In the glossary
Where it fits
Combine tables
How do I combine several tables without losing rows or inflating my numbers?
Lessons in this module
- Join tables with INNER JOIN and LEFT JOIN (this lesson)
- Join traps, and how to detect them
What you will learn in this module
This lesson is part of the course Model your product’s data and query it with SQL
- Combine several tables with INNER and LEFT joins, and check that the result neither loses nor duplicates any row.
Related courses
- Product ManagementAdvancedRegular practice: you already use the tools or work on this topic.
Git for PMs: ship as a team without putting production at risk
3 hr 30 min
- Tech for PMsAll levelsNo prerequisites: accessible to everyone.
Explain how a web product works, from browser to server
2 hr 30 min
- Tech for PMsJuniorSome basics are useful: introductory knowledge of the topic.
Design and test an API integration as a PM
3 hr