shadilForefront Holder Distribution
    Updated 2022-04-15
    with balances_tbl as (
    SELECT
    CASE
    when balance <= 1 and balance> 0 then '0-1'
    when balance > 1 and balance <= 99 then '1-99'
    when balance > 99 and balance <= 150 then '99-150'
    when balance > 150 and balance <700 then '150-700'
    when balance > 700 and balance < 1000 then '700-1000'
    when balance >= 1000 and balance <1200 then '1000-1200'
    when balance >= 1200 then '1200+' end as distribution,
    *
    from ethereum.erc20_balances
    where contract_address = '0x7e9d8f07a64e363e97a648904a89fb4cd5fb94cd'
    and date(balance_date) = CURRENT_DATE - 2
    )
    SELECT
    distribution,
    count(1) as wallets,
    sum(balance) as amount
    from balances_tbl
    group by distribution

    Run a query to Download Data