SUM("NEW SWAPPERS") | AVG("NEW SWAPPERS") | |
---|---|---|
1 | 1457 | 45.53125 |
MasiTotal New Swappers
Updated 2025-05-17
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
›
⌄
with tb1 as (select trunc(block_timestamp,'day') as day,
tx_hash,
origin_from_address,
POOL_NAME,
PLATFORM,
token_in,
token_out,
symbol_in,
symbol_out,
case when amount_in_Usd is null then amount_out_usd else amount_in_usd end as volume
from avalanche.defi.ez_dex_swaps
where (token_in in (lower('0xE7d69acbc00D0EC5d9c02162310EE21DAA77f69C'),lower('0x420FcA0121DC28039145009570975747295f2329'))
or token_out in (lower('0xE7d69acbc00D0EC5d9c02162310EE21DAA77f69C'),lower('0x420FcA0121DC28039145009570975747295f2329')))
)
,
tb2 as ( select min(day) as date,
origin_from_address
from tb1
group by 2)
,
tb3 as (select date,
count(DISTINCT origin_from_address) as "New Swappers",
sum("New Swappers") over (order by date asc) as "Cumulative New Swappers"
from tb2
where date >= current_date - 31
group by 1)
select sum("New Swappers"),
avg("New Swappers")
from tb3
Last run: about 1 month ago
1
17B
9s