Delamir-6014OSMO01-1 both asset Top 5 pools by providers
    Updated 2022-11-28
    with single as (
    select
    tx_id,
    pool_id,
    count (tx_id) as TXs_1
    from osmosis.core.fact_liquidity_provider_actions
    where action = 'pool_joined'
    and TX_STATUS = 'SUCCEEDED'
    group by 1,2
    having count (tx_id)<2
    )
    , pair as (
    select
    tx_id,
    pool_id,
    count (tx_id) as TXs_2
    from osmosis.core.fact_liquidity_provider_actions
    where action = 'pool_joined'
    and TX_STATUS = 'SUCCEEDED'
    group by 1,2
    having count (tx_id)>=2
    )
    select
    b.pool_id as Pool_number,
    count(distinct b.tx_id) as TXs,
    count(distinct liquidity_provider_address) as Providers
    from osmosis.core.fact_liquidity_provider_actions a
    join pair b on a.tx_id = b.Tx_id
    group by 1
    order by 3 desc
    limit 5


    Run a query to Download Data