cypherETH Gas price
Updated 2022-06-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
24
25
26
27
28
29
30
31
32
33
›
⌄
with gas_prices as (select
date_trunc('day', block_timestamp) as date,
avg(gas_price) as avg_gas_price
from ethereum.core.fact_transactions
where date >= current_date() - 90
group by date),
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() - 90
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() - 90
and token_address is null
group by date),
joined as (select * from steth_price
left join eth_price using (date)),
peg as (select *, steth_price/eth_price as "steth/eth"
from joined)
select * from gas_prices
left join peg using (date)
Run a query to Download Data