Updated 2022-09-28
    select
    BLOCK_TIMESTAMP::date as day,
    'LP provide' as actions,
    case
    when currency ='uosmo' then 'OSMO' else 'AXL' end as tokens,
    sum(AMOUNT/1e6) as deposit_token,
    sum(deposit_token) over (partition by tokens order by day) rate_deposit_osmo,
    count(distinct tx_id) as action_count,
    count(distinct LIQUIDITY_PROVIDER_ADDRESS) as no_users,
    sum(no_users) over (order by day) as cum_users
    from osmosis.core.fact_liquidity_provider_actions
    where POOL_ID='812'
    and action in ('pool_joined')
    and TX_STATUS='SUCCEEDED'
    group by 1,2,3
    union all
    select
    BLOCK_TIMESTAMP::date as day,
    'LP remove' as actions,
    case
    when currency ='uosmo' then 'OSMO' else 'AXL' end as tokens,
    sum(AMOUNT/1e6) as deposit_token,
    sum(deposit_token) over (partition by tokens order by day) rate_deposit_osmo,
    count(distinct tx_id) as action_count,
    count(distinct LIQUIDITY_PROVIDER_ADDRESS) as no_users,
    sum(no_users) over (order by day) as cum_users
    from osmosis.core.fact_liquidity_provider_actions
    where POOL_ID='812'
    and action in ('pool_exited')
    and TX_STATUS='SUCCEEDED'
    group by 1,2,3


    Run a query to Download Data