MoeETH stk stwise dist
    Updated 2022-09-05
    with base as (select
    block_timestamp,
    tx_hash,
    ORIGIN_FROM_ADDRESS as users,
    RAW_AMOUNT/1e18 as amount_eth,
    'stakewise' as platform
    from ethereum.core.fact_token_transfers
    where
    ORIGIN_TO_ADDRESS = lower('0xC874b064f465bdD6411D45734b56fac750Cda29A')


    )

    , base1 as (select * from base where AMOUNT_ETH > 0
    and users not in (select address from ethereum.core.dim_labels ))

    select
    case
    when AMOUNT_ETH < 1 then 'under 1 ETH'
    when AMOUNT_ETH between 1 and 10 then '1 - 10 ETH'
    when AMOUNT_ETH between 10 and 20 then '10 - 20 ETH'
    when AMOUNT_ETH between 20 and 50 then '20 - 50 ETH'
    when AMOUNT_ETH between 50 and 100 then '50 - 100 ETH'
    when AMOUNT_ETH between 100 and 200 then '100 - 200 ETH'
    when AMOUNT_ETH > 200 then 'over 200 ETH'
    end as tier,
    count( distinct users ) as user_count,
    count( distinct tx_hash) as txs_count,
    row_number()over(order by user_count) as rank_users,
    row_number()over(order by txs_count) as rank_txs
    from base1 group by 1 order by rank_users,rank_txs
    Run a query to Download Data