Chapter 10: Data Blending: Join Types Explained
10.7. Inner Join in Looker Studio
Inner join is an interesting and time-saving join type. It returns only rows that satisfy the join condition from both tables, meaning non-matching rows from both tables will be dropped. This can be helpful when you only care about the values that can be enriched and do not want to include any missing or null values. A full outer join and union in Looker Studio are the opposite of an inner join which will be discussed in future lessons.
Example: Cross-Device Analysis
Let's consider a scenario where you're performing a cross-device analysis for a client. The client wants to know the total page views and number of users who visited the website from both desktop and mobile devices. You have a dataset that includes user IDs, devices, and the number of page views per user.
In Looker Studio, you can create two filtered views of the dataset: one for desktop devices and one for mobile devices. To join the two views together and only include users who visited from both desktop and mobile devices, you can use an inner join. By doing this, non-matching rows (users who visited from either desktop or mobile, but not both) will be dropped, leaving you with the desired results.
Defining Inner Join in Looker Studio
To define an inner join in Looker Studio, follow these steps:
- Select the tables you want to join together.
- Click the "Blend data" button.
- In the blending options, change the join type from "Left outer" to "Inner."
By changing the join type to inner, you'll only have rows that satisfy the join condition from both tables in your final dataset. This can help you quickly answer questions like the total page views and distinct users who visited from both desktop and mobile devices.
Full Outer Join
A full outer join (or full join) is another type of join that returns all rows from both tables, including those that do not have a match in the other table. When there's no match, the result will show null values for the missing columns. This can be helpful when you want to see all the data from both tables, regardless of whether there's a match or not. For further insights into it, head over to our Union with Full Outer Join lesson.
📩 Receive my weekly Looker Studio tips
🖇 Connect with me on LinkedIn