This also needs to be tweaked. You need to add something to the SELECT
statement before you SUM
.
1 Like
Do you mean I miss the parent " FROM cross_join " ?
You need to add ‘month’ to your statement above:
status_aggregate AS
(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 month
)
ie:
…
(AND segment = 30)
Thank you. I test my code one by one and solve it.
1 Like
Excellent! 🎉You’re welcome.