User Churn rate calculation

Hi,
Could anyone help to spot a mistake I made in my code below? I tried to run the code but it didn’t work. The system didn’t show me an error message either.

Project: Calculating Churn Rate

Here’s the link to the exercise:
https://www.codecademy.com/paths/data-science/tracks/analyze-data-sql-analyze-real-data/modules/analyze-data-sql-user-churn/projects/calc-churn-proj

Here’s my code:

with months as
( select
‘2017-01-01’ as first_day,
‘2017-01-31’ as last_day
union
select
‘2017-02-01’ as first_day,
‘2017-02-28’ as last_day
union
select
‘2017-03-01’ as first_day,
‘2017-03-31’ as last_day),

cross_join as
(select * from subscriptions
cross join months),

status as
(select id, first_day as month,
case
when (subscription_start <first_day)
AND (subscription_end > first_day
OR subscription_end IS NULL)
and (segment = 87)

then 1
else 0
end as is_active_87,
case
when (subscription_start <first_day)
AND (subscription_end > first_day
OR subscription_end IS NULL)
and (segment = 30)
then 1
else 0
end as is_active_30,

case
when (subscription_end between first_day and last_day)
and (segment = 87)
then 1
else 0
end as is_canceled_87,
case
when (subscription_end between first_day and last_day)
and (segment = 30)
then 1
else 0
end as is_canceled_30
from cross_join),

(select month,
sum(is_active_87) as ‘sum_active_87’, sum(is_active_30) as ‘sum_active_30’, sum(is_canceled_87) as ‘sum_canceled_87’,
sum(is_canceled_30) as ‘sum_canceled_30’
from status
group by 1 )

SELECT
month,
1.0 * sum_canceled_87/sum_active_87,
AS churn_rate_87, 1.0*sum_canceled_30/sum_active_30 as churn_rate_30
FROM status_aggregate;

THANKS A LOT!!!