MahrooDistribution of whales sending USDC to Solana
    Updated 2022-12-21
    with inflow as (select date_trunc('day',BLOCK_TIMESTAMP)::date as date,date_trunc('week',BLOCK_TIMESTAMP)::date as week,date_trunc('month',BLOCK_TIMESTAMP)::date as month,
    tx_from as from_address, sum(amount) as inflow, sum(inflow) over ( order by date ) as cum_inflow_amount
    from solana.core.fact_transfers a
    join solana.core.dim_labels b
    on a.tx_from = b.address
    where mint='EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
    group by 1,2,3,4),
    data_1 as (select week, from_address,(inflow) as inflow
    from inflow )
    select week,
    CASE WHEN inflow <100 then 'Under 100 USDC removed from'
    WHEN inflow >=100 and inflow <5000 then 'between 100 USDC and 1000 USDC removed from'
    WHEN inflow >=5000 and inflow <10000 then 'between 5000 USDC and 10000 USDC removed from'
    WHEN inflow >=10000 and inflow <100000 then 'between 10000 USDC and 100000 USDC removed from'
    WHEN inflow >=100000 and inflow <1000000 then 'between 100000 USDC and 1000000 USDC removed from'
    WHEN inflow >=1000000 then 'Above 1 million USDC removed from'
    end as distribution, count(distribution)
    from data_1
    where distribution is not null
    group by 1,2
    Run a query to Download Data