Eman-RazDemographics of Ronin Users
    Updated 2025-03-22
    with tab3 as (with tab1 as (select from_address as user, min(block_timestamp::date) as first_tx_date
    from ronin.core.fact_transactions
    where tx_succeeded='TRUE'
    group by 1),

    tab2 as (select distinct block_timestamp::date as current_date
    from ronin.core.fact_transactions
    where block_timestamp::date = current_date-1)

    select user, case
    when datediff('day',first_tx_date,current_date) = 0 then 'Newborn'
    when datediff('day',first_tx_date,current_date) = 1 then '1-Day Old'
    when datediff('day',first_tx_date,current_date) > 1 and
    datediff('day',first_tx_date,current_date) < 7 then 'Less Than a Week'
    when datediff('day',first_tx_date,current_date) = 7 then '1 Week Old'
    when datediff('day',first_tx_date,current_date) > 7 and
    datediff('day',first_tx_date,current_date) < 30 then 'Less Than a Month'
    when datediff('day',first_tx_date,current_date) = 30 then '1 Month Old'
    when datediff('day',first_tx_date,current_date) > 30 then 'Over 1 Month'
    end as "Wallet Age"
    from tab1 , tab2)

    select "Wallet Age", count(distinct user) as "Number of Users"
    from tab3
    group by 1
    order by 2 desc
    Last run: about 1 month ago
    Wallet Age
    Number of Users
    1
    Over 1 Month7505749
    2
    Less Than a Month284974
    3
    Less Than a Week40802
    4
    1 Month Old39683
    5
    1-Day Old13130
    6
    1 Week Old11709
    7
    Newborn3426
    7
    162B
    7s