Eman-RazInflow Volume based on Stablecoin
    Updated 2023-04-13
    with tab3 as (select distinct address as ftx_address
    from ethereum.core.dim_labels
    where label='ftx'),
    tab4 as (select date_trunc('day',block_timestamp) as date, amount_usd, symbol, tx_hash, from_address, to_address
    from ethereum.core.ez_token_transfers
    where symbol='USDC' or symbol='USDT' or symbol='DAI' or symbol='TUSD' or symbol='USDP' or symbol='sUSD' or symbol='BUSD')

    select date, sum(amount_usd) as inflow_vol, symbol
    from tab3 left join tab4 on tab3.ftx_address=tab4.to_address
    where from_address<>ftx_address and date>=current_date-30 and date<>current_date
    group by 1,3
    order by 1
    Run a query to Download Data