rajsEthereum Gas Fees
Updated 2022-11-15
999
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
›
⌄
with eth_price as
(
SELECT
*
-- distinct symbol
from ethereum.core.fact_hourly_token_prices
where symbol = 'WETH'
and hour >= CURRENT_DATE - interval '30 days'
order by 1 desc
-- limit 3
)
,
eth_gas as
(
SELECT
'1. Ethereum' as blockchain,
-- sum(tx_fee) as tx_fee_native,
sum(tx_fee * price) as tx_fee_usd,
count(distinct block_hash) as no_of_blocks
from ethereum.core.fact_transactions eg
left join eth_price ep
on date_trunc('hour', eg.block_timestamp) = ep.hour
where eg.block_timestamp >= CURRENT_DATE - interval '30 days'
group by 1
)
,
sol_price as
(
SELECT
recorded_hour,
avg(close) as sol_price
from solana.core.fact_token_prices_hourly
where recorded_hour >= CURRENT_DATE - interval '30 days'
and symbol = 'SOL'
Run a query to Download Data