NavidUntitled Query
Updated 2022-11-29Copy 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
›
⌄
with single_asset_txs as (
select
tx_id
from
osmosis.core.fact_liquidity_provider_actions
where action = 'pool_joined' and tx_status = 'SUCCEEDED'
group by tx_id
having
count(*)=1
), both_assets_txs as (
select
tx_id
from
osmosis.core.fact_liquidity_provider_actions
where
action = 'pool_joined' and tx_status = 'SUCCEEDED'
group by
tx_id
having count(*)>1
)
select
'Single Asset' as type,
count(distinct a.tx_id) as transactions_count,
count(distinct liquidity_provider_address) as users_count
from
osmosis.core.fact_liquidity_provider_actions a join single_asset_txs b on a.tx_id=b.tx_id
union all
select
'All Assets' as type,
count(distinct a.tx_id) as transactions_count,
count(distinct liquidity_provider_address) as users_count
from
osmosis.core.fact_liquidity_provider_actions a join both_assets_txs b on a.tx_id=b.tx_id
-- reference: https://app.flipsidecrypto.com/velocity/queries/ca327b4f-0ee8-4e59-9403-0ac0ce72869c
Run a query to Download Data