-- Club subscriptions ended -- Paid-for subscriptions by the month they ended. SELECT strftime(ended_at, '%Y-%m') AS month, count(*) AS value FROM billing.subscription WHERE ended_at >= TIMESTAMP '2023-10-01' AND ended_at < TIMESTAMP '2026-10-01' AND (NOT is_gift) GROUP BY 1 ORDER BY 1