bergCumulative Raydium Users Over last 3 months
Updated 2023-02-17Copy 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
›
⌄
with
min_date_list as (
select swapper, min (block_timestamp) as min_date
from solana.core.fact_swaps
where swap_program in ('ORCA Token Swap V2', 'orca token swap')
group by swapper
),
list1 as (
select date_trunc('day', min_date)::date as day,
count(distinct swapper) as new_users
from min_date_list
group by day
)
select list1.day "Day",
count(distinct swapper) "Users",
new_users "New Users",
sum("Users") over (order by day asc) "Comulative Users",
sum("New Users") over (order by day asc) "Comulative New Users"
from solana.core.fact_swaps
join list1
on list1.day = block_timestamp::date
where succeeded = 1
and list1.day >= current_date - interval '90 days'
and swap_program in ('ORCA Token Swap V2', 'orca token swap')
group by 1, 3
Run a query to Download Data