MostlyData_CDF T1 - Tx Topology PF
Updated 2024-12-05
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
›
⌄
-- forked from CDF T1 - Tx Topology @ https://flipsidecrypto.xyz/studio/queries/7015bc61-3710-46a2-937e-ed0adee46791
with transaction_by_type_raw as(
select
tx_hash,
block_number,
gas_used,
position,
input_data,
max_priority_fee_per_gas,
tx_fee_precise
from ethereum.core.fact_transactions
where
block_timestamp >= current_date() - interval '{{n_days}} days'
)
,transaction_by_type as(
select
ty.*,
ty.tx_fee_precise - bi.block_header_json['baseFeePerGas'] * pow(10,-18) * ty.gas_used as pf,
(ty.tx_fee_precise - bi.block_header_json['baseFeePerGas'] * pow(10,-18) * ty.gas_used) * pow(10,9) / ty.gas_used as pf_ug
--,bi.gas_used / bi.gas_limit as gas_share
from transaction_by_type_raw ty
inner join ethereum.core.fact_blocks bi on bi.block_number = ty.block_number
where
block_timestamp >= current_date() - interval '{{n_days}} days'
)
QueryRunArchived: QueryRun has been archived