cyphersteth vs eth price core table
Updated 2022-11-12Copy 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
›
⌄
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