MLDZMNSushi treasury
    Updated 2022-06-30
    with tb1 as (select
    BLOCK_TIMESTAMP::date as day,
    'inflow' as type,
    sum(AMOUNT_USD) as volume
    from ethereum.core.ez_token_transfers
    where TO_ADDRESS=lower('0xe94b5eec1fa96ceecbd33ef5baa8d00e4493f4f3')
    and BLOCK_TIMESTAMP>=CURRENT_DATE-90
    group by 1),

    tb2 as (select
    BLOCK_TIMESTAMP::date as day,
    'Outflow' as type,
    sum(AMOUNT_USD) as volume
    from ethereum.core.ez_token_transfers
    where FROM_ADDRESS=lower('0xe94b5eec1fa96ceecbd33ef5baa8d00e4493f4f3')
    and BLOCK_TIMESTAMP>=CURRENT_DATE-90
    group by 1)

    select * from tb1
    union all
    select * from tb2

    Run a query to Download Data