Now that we have an active and canceled status for each subscription for each month, we can aggregate them.
GROUP BY month and create a
SUM() of the two columns from the
This provides a list of months, with their corresponding number of active users at the beginning of the month and the number of those users who cancel during the month.
status_aggregate temporary table. This table should have the following columns:
month- selected from the
SUM()of active users for this month
SUM()of canceled users for this month
SELECT * FROM status_aggregate;
at the bottom of this exercise so you can visualize the temporary table you create.