0-MIDstake size-near
    Updated 2025-03-02
    with tab1 as (
    SELECT TX_HASH
    from near.core.ez_token_transfers
    where CONTRACT_ADDRESS='linear-protocol.near'
    and MEMO='stake'
    )
    select case
    when AMOUNT>0 and AMOUNT<5 then 'Below 5 $NEAR'
    when AMOUNT>=5 and AMOUNT<=20 then '5~20 $NEAR'
    when AMOUNT>20 and AMOUNT<=200 then '20~200 $NEAR'
    when AMOUNT>200 and AMOUNT<=2000 then '200~2000 $NEAR'
    when AMOUNT>2000 then 'Up to 2000 $NEAR' end as dis_volume
    ,count(distinct FROM_ADDRESS)as stakers
    ,count(distinct TX_HASH) as stakes
    from near.core.ez_token_transfers
    where TX_HASH in (select TX_HASH from tab1)
    and TO_ADDRESS='linear-protocol.near'
    and dis_volume is not null
    group by 1
    QueryRunArchived: QueryRun has been archived