NavidUntitled Query
    Updated 2022-11-29
    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