Eman-RazDistribution of Contracts By Number of Transaction
    Updated 2025-02-04
    with tab1 as (select contract_address, count(distinct tx_hash), case
    when count(distinct tx_hash)=1 then 'n=1'
    when count(distinct tx_hash)>1 and count(distinct tx_hash)<=5 then '1<n<=5'
    when count(distinct tx_hash)>5 and count(distinct tx_hash)<=10 then '5<n<=10'
    when count(distinct tx_hash)>10 and count(distinct tx_hash)<=100 then '10<n<=100'
    when count(distinct tx_hash)>100 and count(distinct tx_hash)<=1000 then '100<n<=1000'
    when count(distinct tx_hash)>1000 then 'n>1000'
    end as "Number of Transactions"
    from aurora.core.fact_logs
    where tx_status='SUCCESS'
    and block_timestamp::date>='{{Start_Date}}' and block_timestamp::date<='{{End_Date}}'
    group by 1)

    select "Number of Transactions", count(distinct contract_address) as "Number of Contracts"
    from tab1
    group by 1
    order by 1
    Last run: 2 months ago
    Number of Transactions
    Number of Contracts
    1
    100<n<=1000266
    2
    10<n<=100524
    3
    1<n<=58006
    4
    5<n<=107363
    5
    n=12688
    6
    n>1000221
    6
    100B
    4s