Afonso_Diazcategorized by number of users
    Updated 2025-01-25
    with

    transactions as (
    select
    origin_to_address as contract_address,
    tx_hash,
    block_timestamp,
    tx_fee,
    from_address as user
    from
    sei.core_evm.ez_decoded_event_logs
    join
    sei.core_evm.fact_transactions using (tx_hash, block_timestamp)
    where
    status = 'SUCCESS'
    ),

    contracts as (
    select
    contract_address,
    count(distinct block_timestamp::date) as active_days,
    count(distinct tx_hash) as transactions,
    count(distinct user) as users
    from
    transactions
    group by 1
    order by transactions desc
    )

    select
    case
    when users < 50 then 'a. < 50 Users'
    when users <= 250 then 'b. 51 - 250 Users'
    when users <= 500 then 'c. 251 - 500 Users'
    when users <= 1000 then 'd. 500 - 1000 Users'
    when users <= 10000 then 'e. 1001 - 10,000 Users'
    QueryRunArchived: QueryRun has been archived