From the course: Complete Guide to Analytics Engineering
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Inner joining multiple tables
From the course: Complete Guide to Analytics Engineering
Inner joining multiple tables
- [Narrator] Picture a Venn diagram with two intersecting circles. The circle on the left contains our sales data. The circle on the right contains our customer data. When we write a SQL query with an inner join, only the data that overlaps between the two tables will be returned. Hence the name inner join. The inner join is a great option for when you only want data that exists in both tables. In the real world, it's not always that simple, so I find that we use other joins more often, but in this video we're going to focus on inner joins. Back to our example of inner join between sales data and customer data. We need to create a query so that our fulfillment team can piece together which sales need to be shipped to which states. We're going to build an inner joins that we can pull columns from both tables for every sale that we have. Let's jump back into GitHub Codespaces with our SQL practice SQL file. When writing a SQL Select statement that references two tables, we first list…
Contents
-
-
-
-
-
-
-
-
(Locked)
Introduction to SQL for analytics engineering1m 17s
-
(Locked)
The SELECT statement4m 31s
-
(Locked)
Filtering data results with the WHERE clause9m 49s
-
Aggregate functions in SQL6m 51s
-
(Locked)
SQL date functions6m 28s
-
(Locked)
Inner joining multiple tables7m 26s
-
(Locked)
Left joining multiple tables8m 45s
-
(Locked)
Other types of SQL joins5m 18s
-
(Locked)
Common table expressions9m 30s
-
(Locked)
CoderPad solution: Modeling data with SQL37s
-
(Locked)
-
-
-
-