BlockTrackernew vs returning wallets
Updated 2025-05-28Copy 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 dau_ as (
select
date_trunc('day', block_timestamp) as date,
count(distinct swapper) as active_wallets
from solana.defi.ez_dex_swaps
where (swap_from_mint = '2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv' or swap_to_mint = '2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv')
and block_timestamp > '2024-12-15'
group by date
)
,
new_ as (
select
date_trunc('day', first_time) as date,
count(distinct swapper) as new_wallets
from (
select
swapper,
min(block_timestamp) as first_time
from solana.defi.ez_dex_swaps
where (swap_from_mint = '2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv' or swap_to_mint = '2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv')
and block_timestamp > '2024-12-15'
group by 1
)
group by 1
)
select
dau_.date,
active_wallets,
new_wallets,
active_wallets - new_wallets as returning_wallets
from dau_
left join new_ using (date)
QueryRunArchived: QueryRun has been archived