Updated 2023-06-06
    select
    date_trunc('month',block_timestamp) as date,
    'deposit' as actions,
    count(distinct tx_hash) as count_txn,
    count(distinct DEPOSITOR_ADDRESS) as no_users,
    sum(ISSUED_TOKENS) as Daily_amount,
    sum(SUPPLIED_USD) as volume
    from ethereum.aave.ez_deposits
    where block_timestamp >= CURRENT_DATE - 365
    and symbol = 'AAVE'
    group by 1
    union all
    select
    date_trunc('month',block_timestamp) as date,
    'Withdraw' as actions,
    count(distinct tx_hash) as count_txn,
    count(distinct DEPOSITOR_ADDRESS) as no_users,
    sum(WITHDRAWN_TOKENS) as Daily_amount,
    sum(WITHDRAWN_USD) as volume
    from ethereum.aave.ez_withdraws
    where block_timestamp >= CURRENT_DATE - 365
    and symbol = 'AAVE'
    group by 1

    Run a query to Download Data