MLDZMNAX6
Updated 2022-09-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
›
⌄
with tb1 as (
select
'LP provider' as type,
LIQUIDITY_PROVIDER_ADDRESS as sender,
count(tx_id) as no_transaction
from osmosis.core.fact_liquidity_provider_actions
where POOL_ID='812'
and action in ('pool_joined')
and TX_STATUS='SUCCEEDED'
group by 1,2
union all
select
'Swapper' as type,
trader as sender,
count(tx_id) as no_transaction
from osmosis.core.fact_swaps
where(POOL_IDS[0]=812 or POOL_IDS[1]=812) and TX_STATUS='SUCCEEDED'
group by 1,2
)
select
type,
case
when no_transaction=1 then 'One time users'
when no_transaction>1 then 'More than 1 transaction'
end as buckets,
count(distinct sender) as count_users
from tb1
group by 1,2
Run a query to Download Data