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

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