CryptoIcicle2- Flow - 3. Monthly Active Users
    Updated 2023-04-11
    -- Track how the Flow blockchains daily active users have evolved over time. What about monthly? All-time wallets?
    -- Recently, we’ve identified some interesting spikes (in both directions) in daily active users.
    --Chart this activity, and try to uncover any reasonable explanations for the results.
    -- Payouts:
    -- Rank amount
    -- 1st place: 350$ in FLOW
    -- 2nd through 20th: 85$ in FLOW
    with
    wallets as (
    select
    date_trunc('month', date) as date,
    payer,
    sum(n_days) as n_days_week
    from
    (
    select
    block_timestamp::date as date,
    payer,
    1 as n_days
    from
    flow.core.fact_transactions
    group by
    1,
    2
    )
    group by
    1,
    2
    having
    n_days_week >= {{majority_n_days}}
    )
    select
    date_trunc('{{date_range}}', t.block_timestamp) as day,
    count(t.payer) as active_users,
    active_users - lag(active_users, 1) ignore nulls over (order by day asc) as monthly_change,
    avg(active_users) over (
    Run a query to Download Data