pepperwind / answer_key /kpis /club_gift_subscriptions.sql
rasinmuhammed's picture
Pepperwind Trading Co. preview, version 1.0
27ec678 verified
Raw History Blame Contribute Delete
294 Bytes
-- Club gift subscriptions started
-- Gift subscriptions by the month they started.
SELECT strftime(start_date, '%Y-%m') AS month, count(*) AS value FROM billing.subscription WHERE start_date >= TIMESTAMP '2023-10-01' AND start_date < TIMESTAMP '2026-10-01' AND (is_gift) GROUP BY 1 ORDER BY 1