cyphersteth vs eth price core table
    Updated 2022-11-12
    with steth_price as (select
    date_trunc('day', hour) as date,
    avg(price) as steth_price
    from ethereum.core.fact_hourly_token_prices
    where hour >= current_date() - 250
    and token_address = lower('0xae7ab96520de3a18e5e111b5eaab095312d7fe84')
    group by date),

    eth_price as (select
    date_trunc('day', hour) as date,
    avg(price) as eth_price
    from ethereum.core.fact_hourly_token_prices
    where hour >= current_date() - 250
    and token_address is null
    group by date),

    joined as (select * from steth_price
    left join eth_price using (date))

    select *, steth_price/eth_price as "steth/eth"
    from joined



    Run a query to Download Data