0-MIDdaily new users arb
Updated 2024-04-08
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 tab1 as (
select date_trunc('minute',BLOCK_TIMESTAMP) as time
,ORIGIN_FROM_ADDRESS
from arbitrum.core.ez_decoded_event_logs
where ORIGIN_TO_ADDRESS='0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae'
and EVENT_NAME='LiFiGenericSwapCompleted'
and BLOCK_TIMESTAMP::date>=current_date-30
and TX_STATUS='SUCCESS'
),
tab2 as (
select date_trunc('day',time) as day
,ORIGIN_FROM_ADDRESS
,row_number()over(partition by ORIGIN_FROM_ADDRESS order by day) as time_row
from tab1
)
select day
,count(ORIGIN_FROM_ADDRESS) as new_swappers
from tab2
where time_row=1
group by 1