MasiNet Volume per Symbol since the New year
    Updated 2023-03-01
    with deposit as ( select trunc(block_timestamp,'day') as day,
    symbol,
    count(DISTINCT DEPOSITOR_ADDRESS) as count_user,
    count(DISTINCT tx_hash) as count_tx,
    sum(SUPPLIED_USD) as volume_usd,
    avg(SUPPLIED_USD) average_usd
    from ethereum.aave.ez_deposits
    where block_timestamp >= '2023-01-01'
    and SUPPLIED_USD > 0
    group by 1,2)
    ,
    withdraw as ( select trunc(block_timestamp,'day') as day,
    symbol,
    count(DISTINCT DEPOSITOR_ADDRESS) as count_user,
    count(DISTINCT tx_hash) as count_tx,
    sum(WITHDRAWN_USD) as volume_usd,
    avg(WITHDRAWN_USD) average_usd
    from ethereum.aave.ez_withdraws
    where block_timestamp >= '2023-01-01'
    and WITHDRAWN_USD > 0
    group by 1,2)
    ,
    tb2 as ( select a.day,
    a.symbol,
    a.volume_usd as deposit_volume,
    b.volume_usd as withdraw_volume,
    deposit_volume-withdraw_volume as net_volume
    from deposit a left outer join withdraw b on a.day = b.day and a.symbol = b.symbol)

    select symbol,
    sum(deposit_volume) as total_deposit,
    sum(withdraw_volume) as total_withdraw,
    total_deposit-total_withdraw as current_net
    from tb2
    group by 1
    Run a query to Download Data