mo115Untitled Query
    Updated 2022-06-10
    with pool_joined as (select date_trunc('day', BLOCK_TIMESTAMP ) as day,
    LIQUIDITY_PROVIDER_ADDRESS as addresss,
    count (distinct tx_id) as countt,
    sum (amount/pow (10,6)) as amunt,
    ACTION
    ,LABEL
    from osmosis.core.fact_liquidity_provider_actions,osmosis.core.dim_labels
    where ADDRESS = CURRENCY
    and block_timestamp::date between '2022-06-07' and '2022-06-10'
    and block_id between '4707299' and '4713063'
    and TX_STATUS = 'SUCCEEDED'
    and action='pool_joined'
    group by 1,2,5,6
    having count (distinct tx_id) >1
    ),
    pool_exited as (select date_trunc('day', BLOCK_TIMESTAMP ) as day,
    LIQUIDITY_PROVIDER_ADDRESS as addresss,
    count (distinct tx_id) as countt,
    sum (amount/pow (10,6)) as amunt,
    ACTION
    ,LABEL
    from osmosis.core.fact_liquidity_provider_actions,osmosis.core.dim_labels
    where ADDRESS = CURRENCY
    and block_timestamp::date between '2022-06-07' and '2022-06-10'
    and block_id between '4707299' and '4713063'
    and TX_STATUS = 'SUCCEEDED'
    and action='pool_exited'
    group by 1,2,5,6
    having count (distinct tx_id) >1)
    select *
    from pool_joined a inner join pool_exited b on (a.ADDRESSS=b.ADDRESSS and a.LABEL=b.LABEL)

    Run a query to Download Data