Eman-RazDemographics of Ink Users
    Updated 2025-04-17
    -- https://flipsidecrypto.xyz/studio/queries/336ee0ff-7bf4-4ca0-a29e-6d2c71b2c154

    with tab3 as (with tab1 as (select from_address as user, min(block_timestamp::date) as first_tx_date
    from ink.core.fact_transactions
    where tx_succeeded='TRUE'
    group by 1),

    tab2 as (select distinct block_timestamp::date as current_date
    from ink.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: 10 days ago
    Wallet Age
    Number of Users
    1
    Over 1 Month334144
    2
    Less Than a Month14683
    3
    Less Than a Week2095
    4
    1 Month Old1099
    5
    1 Week Old628
    6
    1-Day Old347
    7
    Newborn111
    7
    153B
    17s