Afonso_Diaz2023-03-10 02:10 PM
    Updated 2023-03-10
    select
    block_hour,
    avg(total_liquidity_usd) as liquidity_usd,
    avg(reserve_price) as token_price_snx,
    row_number() over (order by block_hour desc) as rate
    from ethereum.aave.ez_market_stats
    where reserve_name = 'SNX'
    group by 1
    qualify rate = 1


    -- select reserve_name,
    -- avg (total_liquidity_token) as Liquidity_Token,
    -- avg (total_liquidity_usd) as Liquidity_USD,
    -- avg (reserve_price) as Price,
    -- avg (borrow_rate_stable) as Stable_Borrow_Rate,
    -- avg (borrow_rate_variable) as Variable_Borrow_Rate,
    -- avg (utilization_rate) as Utilization_Rate
    -- from ethereum.aave.ez_market_stats
    -- where block_hour = (select max (block_hour) from ethereum.aave.ez_market_stats)
    -- and reserve_name in ('SNX','UNI','MKR')
    -- group by 1
    -- order by 1
    Run a query to Download Data