alfredfx10Base Gas Fees
Updated 2024-07-01
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
›
⌄
-- forked from mo115 / base fees @ https://flipsidecrypto.xyz/mo115/q/2OCS46eRk0FM/base-fees
with base_fees as
(select
date_trunc('month',BLOCK_TIMESTAMP) as date,
sum (TX_FEE) as gas_paid
from base.core.fact_transactions
WHERE 1=1
AND BLOCK_TIMESTAMP >= '2024-01-01' AND
BLOCK_TIMESTAMP<='2024-06-30'
group by 1),
ETH as (select date_trunc ('day',HOUR) as date, avg(PRICE)as price
from ethereum.price.ez_prices_hourly
where SYMBOL = 'WETH'
group by 1)
select o.date,gas_paid as gas_paid_ETH, (gas_paid*price) as gas_paid_USD
from base_fees o left join ETH e on o.date=e.date
QueryRunArchived: QueryRun has been archived