0xaimanstETH price deviation from WETH
    Updated 2022-06-04

    with steth as (
    select hour as date, price as avg_price from(
    select * from ethereum.core.fact_hourly_token_prices

    where token_address=lower('0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84')
    )

    -- group by 1 order by 1
    ),
    weth as (select hour as day, price as avg_price
    from (select * from ethereum.core.fact_hourly_token_prices

    where symbol like 'WETH')
    -- group by 1 order by 1
    )

    select steth.date as hr, steth.avg_price as steth_price, weth.avg_price as weth_price, ((weth_price-steth_price)/weth_price)*100 as deviation_price
    from steth inner join weth on steth.date=weth.day


    where steth.date>='2022-05-01'
    Run a query to Download Data