RayyykNumber of OSMO LP-ers, Stakers and Non-OSMO LP-ers / Stakers
    Updated 2022-07-10
    with table_1 as (select liquidity_provider_address
    from osmosis.core.fact_liquidity_provider_actions
    where tx_status = 'SUCCEEDED'
    and currency = 'uosmo'
    and action = 'pool_joined'),
    table_2 as (select delegator_address
    from osmosis.core.fact_staking
    where tx_status = 'SUCCEEDED'
    and currency = 'uosmo'
    and action = 'delegate'),

    table_3 as (select tx_from
    from osmosis.core.fact_transactions
    where tx_from not in (select liquidity_provider_address from table_1)
    and tx_from not in (select delegator_address from table_2))

    select 'OSMO Liquidity Providers',
    count(distinct(liquidity_provider_address)) as wallet_count
    from table_1
    union
    select 'OSMO Stakers',
    count(distinct(delegator_address))
    from table_2
    union
    select 'Non-OSMO Liquidity Providers nor Stakers',
    count(distinct(tx_from))
    from table_3
    Run a query to Download Data