MLDZMNder_3
Updated 2022-09-13
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with tb1 as (select
date_trunc('week',HOUR) as weeks,
avg(PRICE) as rETH_USD
from ethereum.core.fact_hourly_token_prices
where SYMBOL='rETH'
and HOUR>=CURRENT_DATE-365
group by 1
),
tb2 as (select
date_trunc('week',hour) as weeks,
avg(price) as ETH_USD
from ethereum.core.fact_hourly_token_prices
where weeks>=CURRENT_DATE-365
and SYMBOL='WETH'
group by 1)
select tb1.weeks as week,
rETH_USD,
ETH_USD,
ETH_USD/rETH_USD,
ETH_USD-rETH_USD
from tb1 join tb2 on tb1.weeks=tb2.weeks
Run a query to Download Data