select date(BLOCK_HOUR) as date,
RESERVE_NAME as token,AVG(SUPPLY_RATE) as supply_rate,
AVG(BORROW_RATE_STABLE) as borrow_stable_rate,AVG(BORROW_RATE_VARIABLE) as borrow_variable_rate
from flipside_prod_db.aave.market_stats
where AAVE_VERSION = 'Aave V2'
and RESERVE_NAME in ('WETH' , 'WBTC' , 'DAI' , 'USDC' , 'UNI')
and date > CURRENT_DATE - 90
group by 1,2
order by 2 desc