Updated 2022-10-07

    with a as(
    select sum(t.amount) as outflow_amount, tx_to
    from solana.core.fact_transfers t,solana.core.dim_labels l
    where t.TX_TO = l.address
    and mint='EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
    and BLOCK_TIMESTAMP::date< CURRENT_DATE-60
    group by 2
    order by 1 DESC
    limit 9
    )

    select case when tx_to in (select tx_to from a) then 'Whales' else 'Others' end as address_status
    ,sum(t.amount) as outflow_amount
    ,(select sum(t.amount)
    from solana.core.fact_transfers t,solana.core.dim_labels l
    where t.TX_TO = l.address
    and mint='EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
    and BLOCK_TIMESTAMP::date< CURRENT_DATE-60) as Total_outflow_amount
    ,100*(outflow_amount/Total_outflow_amount) as Percent
    from solana.core.fact_transfers t,solana.core.dim_labels l
    where t.TX_TO = l.address
    and mint='EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
    and BLOCK_TIMESTAMP::date< CURRENT_DATE-60
    group by 1
    Run a query to Download Data