Eman-RazDistribution of MoonCoin Holders By Balance
    Updated 7 hours ago
    with tab3 as (
    with tab2 as (
    with tab1 as (
    select tx_from as user, -amount/pow(10,5) as amount
    from eclipse.core.fact_transfers
    where mint='HgD4Dc6qYCj3UanMDiuC4qANheeTsAvk6DY91B3F8gnL'
    and succeeded='TRUE'

    union all

    select tx_to as user, amount/pow(10,5) as amount
    from eclipse.core.fact_transfers
    where mint='HgD4Dc6qYCj3UanMDiuC4qANheeTsAvk6DY91B3F8gnL'
    and succeeded='TRUE')

    select user as "Holder", sum(amount) as "Balance"
    from tab1
    group by 1)

    select "Holder", "Balance", case
    when "Balance"<=100000 then 'V<=100k'
    when "Balance">100000 and "Balance"<=1000000 then '100k<V<=1m'
    when "Balance">1000000 and "Balance"<=10000000 then '1m<V<=10m'
    when "Balance">10000000 and "Balance"<=100000000 then '10m<V<=100m'
    when "Balance">100000000 and "Balance"<=1000000000 then '100m<V<=1b'
    when "Balance">1000000000 then 'V>1b'
    end as "Balance Size"
    from tab2
    where "Balance">0)

    select "Balance Size", count(distinct "Holder") as "Number of Holders"
    from tab3
    group by 1
    order by 2 desc

    Last run: about 7 hours agoAuto-refreshes every 24 hours
    Balance Size
    Number of Holders
    1
    100k<V<=1m5716
    2
    V<=100k4516
    3
    1m<V<=10m3384
    4
    10m<V<=100m373
    5
    100m<V<=1b245
    6
    V>1b9
    6
    107B
    7s