hbd1994Top Users
Updated 2022-09-19Copy 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
29
30
31
32
33
34
35
36
›
⌄
with tab1 as (with swap as (select
'Swap' as type,
*
from arbitrum.core.fact_event_logs
where contract_address = lower ('0xaBBc5F99639c9B6bCb58544ddf04EFA6802F4064')
and event_name = 'Swap'
and tx_status= 'SUCCESS'),
lp as (select
'LP' as type,
*
from arbitrum.core.fact_event_logs
where origin_to_address = '0xa906f338cb21815cbc4bc87ace9e68c87ef8d8f1'
and tx_status= 'SUCCESS'),
trade as (select
'Trade' as type,
*
from arbitrum.core.fact_event_logs
where origin_to_address = lower('0x3D6bA331e3D9702C5e8A8d254e5d8a285F223aba')
and tx_status= 'SUCCESS'
)
select * from swap
union
select * from lp
union
select * from trade)
(select
type,
origin_from_address as users,
count(distinct tx_hash) as tx_count
from tab1
where type = 'Swap'
group by 1,2
order by 3 DESC
Run a query to Download Data