jackguyBase_ez_5 copy
    Updated 2023-08-29
    SELECT
    CASE when active_days = 1 then 'a 1 Active Day'
    when active_days < 5 then 'b 2 - 5 Active Days'
    when active_days < 10 then 'c 5 - 10 Active Days'
    when active_days < 30 then 'd 10 - 30 Active Days'
    else 'e 30+ Active Days' end as active_day_group,
    count(*) as active_users

    FROM (
    SELECT
    from_address,
    count(DISTINCT tx_hash) as events,
    count(DISTINCT date_trunc('day', block_timestamp)) as active_days
    FROM base.core.fact_transactions
    GROUP BY 1
    )
    GROUP BY 1


    Run a query to Download Data