MasiContracts Breakdown by Users
    Updated 2024-06-01
    with tb1 as (select origin_from_address,
    count(DISTINCT tx_hash) as txns,
    count(DISTINCT contract_address) as contracts
    from sei.core_evm.fact_event_logs
    where block_timestamp::date >= '2024-05-27'
    group by 1)

    select count(DISTINCT origin_from_address) as users,
    sum(txns) as transactions,
    case when contracts = 1 then 'a. 1 Contract'
    when contracts = 2 then 'b. 2 Contracts'
    when contracts = 3 then 'c. 3 Contracts'
    when contracts = 4 then 'd. 4 Contracts'
    when contracts = 5 then 'e. 5 Contracts'
    when contracts = 6 then 'f. 6 Contracts'
    when contracts = 7 then 'g. 7 Contracts'
    when contracts = 8 then 'h. 8 Contracts'
    when contracts = 9 then 'i. 9 Contracts'
    when contracts = 10 then 'k. 10 Contracts'
    when contracts > 10 then 'l. > 10 Contracts' end as breakdown
    from tb1
    group by 2




    QueryRunArchived: QueryRun has been archived