Learn
Calculating Churn
Multiple Month: Cross Join Months and Users
Now that we have a table of months, we will join it to the subscriptions table. This will result in a table containing every combination of month and subscription.
Ultimately, this table will be used to determine the status of each subscription in each month.
Instructions
1.
The workspace contains the months
temporary table from the previous exercise.
Create a cross_join
temporary table that is a CROSS JOIN
of subscriptions
and months
.
We’ve added:
SELECT * FROM cross_join LIMIT 100;
at the bottom of this exercise so you can visualize the temporary table you create.
It should SELECT
all the columns from the temporary table.