maybeyonasflipside_dup_query
Updated 2022-07-20Copy Reference Fork
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
gas_stat as (
select
from_address,
'eth' as chain,
sum(tx_fee) as total_fees,
sum(gas_used) as total_gas,
median(tx_fee) as median_fee,
avg(tx_fee) as average_fee,
max(tx_fee) as max_fee,
count(tx_hash) as txs,
count(
case when origin_function_signature = '0x' then '0x' else null end
) as eth_sends,
min(block_timestamp) as first_date
from ethereum.core.fact_transactions
group by 1,2
union all
select
from_address,
'poly' as chain,
sum(tx_fee) as total_fees,
sum(gas_used) as total_gas,
median(tx_fee) as median_fee,
avg(tx_fee) as average_fee,
max(tx_fee) as max_fee,
count(tx_hash) as txs,
count(
case when origin_function_signature = '0x' then '0x' else null end
) as eth_sends,
min(block_timestamp) as first_date
from polygon.core.fact_transactions
group by 1,2
Run a query to Download Data