nsa2000Untitled Query
Updated 2022-09-29
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
›
⌄
with ethereum_transactions as (
select
block_timestamp,
block_number,
tx_hash,
from_address,
eth_value,
tx_fee,
gas_used
from ethereum.core.fact_transactions
where status = 'SUCCESS'
and block_timestamp::date >= '2022-09-06'
and block_timestamp::date <= '2022-09-24'
)
select
block_timestamp::date as "Days",
case
when block_timestamp::date >= '2022-09-01' and block_timestamp::date <= '2022-09-15' and block_number < 15537394 then 'Before Merge'
else 'After Merge'
end as "Time Frame",
count(distinct tx_hash) as "Number of Transactions",
count(distinct from_address) as "Number of Unique User",
sum(eth_value) as "Amount of ETH Transferred",
sum(tx_fee) as "Amount of Fee Spent"
from ethereum_transactions
group by "Days", "Time Frame"
order by "Days"