CryptoLionCopy of brians
    Updated 2021-05-18
    SELECT
    underlying_symbol,
    avg(supply_apy) as supply_apys,
    avg(comp_apy_supply) as comp_apy_supplys,
    supply_apys+comp_apy_supplys as net_supply_apy,
    avg(borrow_apy) as borrow_apyb,
    avg(comp_apy_borrow) as comp_apy_borrowb,
    borrow_apyb-comp_apy_borrowb as net_borrow_apy
    FROM compound.market_stats
    WHERE block_hour >= getdate() - interval '45 days'
    AND underlying_symbol <> 'SAI'
    GROUP BY underlying_symbol
    Run a query to Download Data