Sbhn_NPLP 1
Updated 2023-04-22
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
›
⌄
with new_user as (
select liquidity_provider_address as new_users,
min(block_timestamp::date) as min_date
from osmosis.core.fact_liquidity_provider_actions
where tx_succeeded = 'true'
group by 1),
active_user as (
select block_timestamp,
liquidity_provider_address as active_users
from osmosis.core.fact_liquidity_provider_actions
where tx_succeeded = 'true'
)
select 'New' as type,
date_trunc('day',min_date) as date,
count(DISTINCT new_users) as users,
sum(users) over (order by date) as cumu_users
from new_user
where date between '2023-01-01' and '2023-03-31'
group by 1,2
UNION all
select 'Active' as type,
date_trunc('day',block_timestamp) as date,
count(DISTINCT active_users) as users,
sum(users) over (order by date) as cumu_users
from active_user
where date between '2023-01-01' and '2023-03-31'
group by 1,2
Run a query to Download Data