negin-khETH vs. BTC Price
    Updated 2022-09-30
    with eth_price as (
    select
    date_trunc('day',HOUR) as date,
    round(avg(price)) as eth_price
    from ethereum.core.fact_hourly_token_prices
    where symbol = 'WETH'
    and date >='2022-06-01'
    group by date
    order by date
    ),

    BTC_price as (
    select
    date_trunc('day',HOUR) as date,
    round(avg(price)) as BTC_price
    from ethereum.core.fact_hourly_token_prices
    where symbol = 'WBTC'
    and date >='2022-06-01'
    group by date
    order by date
    )

    SELECT
    a.date,
    a.eth_price,
    b.BTC_price,
    case
    when a.date <'2022-09-14' then 'before_merge'
    when a.date >= '2022-09-14' then 'after_merge'
    end as merge_time
    from eth_price a
    join BTC_price b
    on a.date=b.date
    Run a query to Download Data