Soheil_MKUntitled Query
    Updated 2023-02-15
    WITH withdraw1 as (
    select
    TX_SIGNER as wallet,
    sum((DEPOSIT/pow(10,24))) as near_amounts
    from near.core.fact_transfers
    where STATUS='TRUE'
    and DEPOSIT is not null
    group by 1
    ),

    deposit1 as (
    select
    TX_RECEIVER as wallet,
    sum((DEPOSIT/pow(10,24))) as near_amounts
    from near.core.fact_transfers
    where STATUS='TRUE'
    and DEPOSIT is not null
    group by 1
    ),


    whales as (
    select
    a.wallet::varchar as whale,
    round(sum(a.near_amounts-b.near_amounts)) as near_balance
    from deposit1 a
    join withdraw1 b
    on a.wallet=b.wallet
    where a.wallet not in (select address from near.core.dim_address_labels)
    group by 1
    order by 2 desc
    limit 20
    ),


    near_price as (
    Run a query to Download Data