Pmisha-bmlMdxpriceofethsteth
Updated 2022-06-08
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
with t1 as (select
date_trunc('day',HOUR) as dt1,
avg(PRICE) as STETH
from ethereum.core.fact_hourly_token_prices
where SYMBOL='stETH'
and dt1>=CURRENT_DATE-365
group by 1
order by 1)
,
t2 as (select
date_trunc('day',BALANCE_DATE) as dt2,
avg(PRICE) as ETH
from flipside_prod_db.ethereum.erc20_balances
where CONTRACT_ADDRESS='ETH'
and dt2>=CURRENT_DATE-365
group by 1)
select t1.dt1 as dt,
ETH,
STETH,
STETH/ETH as percent
from t1 join t2 on t1.dt1=t2.dt2
Run a query to Download Data