cybergenlab[Ecosystem metrics] New users per sector
    Updated 2024-11-16
    -- forked from [Ecosystem metrics] User growth @ https://flipsidecrypto.xyz/studio/queries/ccbcc55d-e8a5-48e9-a2d3-44d04078781c

    --Get historical project user growth

    with monthly_new_users as (
    select
    date_trunc('month', block_timestamp) as time,
    coalesce((label_type), 'other') as category,
    count(distinct from_address) as new_users,
    from ethereum.core.fact_transactions as transactions
    left join ethereum.core.dim_labels labels on transactions.to_address = labels.address
    where block_timestamp >= dateadd(month, -1, date_trunc('month',current_date()))
    and block_timestamp < date_trunc('month', current_date())
    and nonce = 0
    and category not in ('token', 'cex', 'chadmin', 'operator', 'flotsam', 'other')
    and status = 'SUCCESS'
    group by 1,2
    )

    select
    *
    from monthly_new_users
    order by 1 desc





    QueryRunArchived: QueryRun has been archived