Sandeshusers profile cosmoverse
    Updated 2022-11-04
    --https://app.flipsidecrypto.com/dashboard/wmDG_Z
    with lptable as (
    select liquidity_provider_address
    from osmosis.core.fact_liquidity_provider_actions
    where currency = 'ibc/987C17B11ABC2B20019178ACE62929FE9840202CE79498E29FE8E5CB02B7C0A4'
    and tx_status = 'SUCCEEDED'
    and action in ('pool_joined','pool_exited')
    and block_timestamp >= '2022-09-26'),

    swaptable as (
    select trader
    from osmosis.core.fact_swaps
    where from_currency = 'ibc/987C17B11ABC2B20019178ACE62929FE9840202CE79498E29FE8E5CB02B7C0A4'
    or to_currency = 'ibc/987C17B11ABC2B20019178ACE62929FE9840202CE79498E29FE8E5CB02B7C0A4'
    and block_timestamp >= '2022-09-26'
    and tx_status = 'SUCCEEDED')

    select 'Only LPed' as type, count (distinct liquidity_provider_address) as Users_Count from lptable
    where liquidity_provider_address not in (select trader from swaptable)

    union ALL

    select 'Only Swapped' as type, count (distinct trader) as Users_Count from swaptable
    where trader not in (select liquidity_provider_address from lptable)

    union ALL

    select 'Swapped and LPed' as type, count (distinct trader) as Users_Count from swaptable
    where trader in (select liquidity_provider_address from lptable)




    Run a query to Download Data