Yousefi_1994Gas Guzzlers - Optimism Hourly Average Block Gas Price
Updated 2022-12-18
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
34
35
36
›
⌄
-------------------------------------optimism-------------------------------------
with optimism_fee_transactions as (
select
block_timestamp,
tx_hash,
block_number,
(gas_price / 1e9) as gas_price,
(gas_price / 1e9) * gas_used as fee,
from_address
from optimism.core.fact_transactions
where block_timestamp::date > current_date - 31
),
eth_price_usd as (
select
hour::date as days,
avg(price) as price_usd
from ethereum.core.fact_hourly_token_prices
where token_address is null
and hour::date > current_date - 31
group by days
),
op_price_usd as (
select
hour::date as days,
avg(price) as price_usd
from optimism.core.fact_hourly_token_prices
where symbol = 'OP'
and hour::date > current_date - 31
group by days
),
optimism_fee_transactions_with_price as (
select
gas.*,
price.price_usd
from optimism_fee_transactions gas
Run a query to Download Data