Abolfazl_771025daily swap activity
Updated 2022-09-30Copy Reference Fork
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 main as (select
distinct miner
from ethereum.core.fact_blocks
where miner is not null
)
select
'before Merge' as period,
date_trunc('day', block_timestamp) as date,
count(TX_HASH) as "count of swaps",
count(distinct origin_from_address) as "count of users",
sum(amount_in) as "swaped volume (ETH)"
from ethereum.core.ez_dex_swaps a
left join main b on a.origin_from_address=b.miner
where symbol_in = 'WETH'
and block_timestamp::date between '2022-09-01' and '2022-09-15 06:46:00.000'
group by 1,2
union
select
'after Merge' as period,
date_trunc('day', block_timestamp) as date,
count(TX_HASH) as "count of swaps",
count(distinct origin_from_address) as "count of users",
sum(amount_in) as "swaped volume (ETH)"
from ethereum.core.ez_dex_swaps a
left join main b on a.origin_from_address=b.miner
where symbol_in = 'WETH'
and block_timestamp::date > '2022-09-15 06:46:00.000'
group by 1,2
Run a query to Download Data