Sbhn_NPAverage Daily Number of Swaps and Swappers on Uniswap
Updated 2022-10-16
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
›
⌄
--credit : alik110
with maintable as (
select 'Optimism' as blockchain,
date_trunc(day,block_timestamp) as date,
count (distinct tx_hash) as Swaps_Count,
count (distinct origin_from_address) as Swappers_Count,
count (distinct contract_address) as Pools_Count
from optimism.core.fact_event_logs t1
where origin_to_address = '0xe592427a0aece92de3edee1f18e0157c05861564'
and event_name = 'Swap'
and tx_status = 'SUCCESS'
and block_timestamp >= '2022-06-01'
group by 1,2
union ALL
select 'Arbitrum' as blockchain,
date_trunc(day,block_timestamp) as date,
count (distinct tx_hash) as Swaps_Count,
count (distinct origin_from_address) as Swappers_Count,
count (distinct contract_address) as Pools_Count
from arbitrum.core.fact_event_logs t1
where origin_to_address = '0xe592427a0aece92de3edee1f18e0157c05861564'
and event_name = 'Swap'
and tx_status = 'SUCCESS'
and block_timestamp >= '2022-06-01'
group by 1,2
union ALL
select 'Polygon' as blockchain,
date_trunc(day,block_timestamp) as date,
count (distinct tx_hash) as Swaps_Count,
count (distinct origin_from_address) as Swappers_Count,
count (distinct contract_address) as Pools_Count
from polygon.core.fact_event_logs t1
Run a query to Download Data