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.
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 Data 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 Data 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 join (or full outer 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.