negin-khETH vs. BTC Price
Updated 2022-09-30Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
›
⌄
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