Soheil_MKUntitled Query
    Updated 2022-09-15
    with deposit as (
    select
    BLOCK_TIMESTAMP::date as date,
    sum(ISSUED_TOKENS) as ETH_amounts_added,
    lag(ETH_amounts_added) ignore nulls over(order by date asc) as lag_ETH_amounts_added,
    ((ETH_amounts_added - lag_ETH_amounts_added)/ lag_ETH_amounts_added)*100 as ETH_amounts_added_volatility
    from ethereum.aave.ez_deposits
    where SYMBOL ='WETH'
    and date >='2022-07-01'
    group by 1
    ),

    withdraw as (
    select
    BLOCK_TIMESTAMP::date as date,
    sum(WITHDRAWN_TOKENS) as ETH_amounts_removed,
    lag(ETH_amounts_removed) ignore nulls over(order by date asc) as lag_ETH_amounts_removed,
    ((ETH_amounts_removed - lag_ETH_amounts_removed)/ lag_ETH_amounts_removed)*100 as ETH_amounts_removed_volatility
    from ethereum.aave.ez_withdraws
    where SYMBOL ='WETH'
    and date >='2022-07-01'
    group by 1
    )

    select
    a.date,
    a.ETH_amounts_added_volatility,
    b.ETH_amounts_removed_volatility
    from deposit a
    join withdraw b
    on a.date=b.date

    Run a query to Download Data