Mix and Match Data
Learn how data scientists use SQL joins to combine relational data for deeper insights.
Raw information rarely comes in one neat table when working as a data scientist. Instead, it’s distributed across multiple related tables—customers in one, transactions in another, products in a third. To uncover meaningful patterns, we need to connect the dots. That’s where SQL joins come in.
But before we join tables, we need to understand how they’re structured and related. We’ll start by creating tables, then move on to how they’re linked using primary and foreign keys, and finally, we’ll dive into the most essential SQL joins we’ll use to analyze real-world data.
Creating tables in SQL
In SQL, a table is like a dataset: rows represent records, and columns represent fields (attributes). As data scientists, we may not always create these tables ourselves, but understanding how they’re built helps us query them effectively.
Here’s a simple syntax to define a table:
Get hands-on with 1400+ tech skills courses.