negin-khComparison of supplied AAVE vs. withdrawn AAVE over last 6 months
    Updated 2022-08-10
    with lst_deposit as (
    select
    date_trunc(day,block_timestamp)::date as date
    ,count(tx_id) as count_deposits
    ,sum(SUPPLIED_USD) as volume_usd
    ,avg(SUPPLIED_USD) as avg_volume_usd
    ,sum(count_deposits) over (order by date) as growth_count_deposits
    ,sum(volume_usd) over (order by date) as growth_volume_usd
    from flipside_prod_db.aave.deposits
    where block_timestamp>='2022-02-01'
    group by date
    order by date
    )
    ,lst_withdrawn as (
    select
    date_trunc(day,block_timestamp)::date as date
    ,count(tx_id) as count_deposits
    ,sum(WITHDRAWN_USD) as volume_usd
    ,avg(WITHDRAWN_USD) as avg_volume_usd
    ,sum(count_deposits) over (order by date) as growth_count_deposits
    ,sum(volume_usd) over (order by date) as growth_volume_usd
    from flipside_prod_db.aave.withdraws
    where block_timestamp>='2022-02-01'
    group by date
    order by date
    )
    select 'supplied ' as type , * from lst_deposit
    union all
    select 'withdrawn' as type , * from lst_withdrawn
    Run a query to Download Data